title: Cloning git in bash script called from php webpage
body: <p>I have very annoying problem here that I am completely lost on.</p>
  
  <p>Am just trying to run a bash script from a php page.</p>
  
  <p>The bash script is a long one.... so I created a caller.sh which calls the ./mainScript.sh to run in the background in the following:</p>
  
  <pre><code>nohup /bin/bash /home/test/customcoincode/CoinCreationBashFile.sh $coinName $coinNameAbreviation $blockReward $blockSpacing $targetTimespan $totalCoins $seedNode $nameSeedNode $headline &gt;&gt; /tmp/BASH2log.txt 2&gt;&amp;1 &amp;
  </code></pre>
  
  <p>in reading my log file it seems some variables are not being passed in...</p>
  
  <p>and at the following lines of code:</p>
  
  <pre><code>echo "Creating New Coin - Downloading code base repo"
  echo "$localFolder/$coinName"
  mkdir -p "$localFolder/$coinName";
  cd "$localFolder/$coinName"
  git clone "$baseRepository" "$localFolder/$coinName"
  echo "Made it here 1"
  </code></pre>
  
  <p>i get outputs of: </p>
  
  <pre><code>Creating New Coin - Downloading code base repo
  /home/test/Foocoin
  cloning into '/home/test/Foocoin'
  could not create directory '/var/www/.ssh'
  host key verification failed
  blah blah ....
  </code></pre>
  
  <p>Why is it looking in the /var/www/ directory?? works fine if I run the script from terminal?</p>
  
  <p>many thanks</p>