I think I have a problem with $PATH. I am running a shell script and it is complaining that it doesnt recognize the command even though when I run it manually it does.
#!/bin/bash # DEPLOYMENT USR="test" APP="/srv/www/test" ENV="/srv/www/test/venv" LOG="/var/log" # LOGGING exec > >(tee -a $LOG/log.log) exec 2> >(tee -a $LOG/error.log) # SOFTWARE apt-get update apt-get install -y python-dev build-essential nginx python-pip # PACKAGES pip install virtualenv uwsgi supervisor # ENVIRONMENT mkdir -p $APP virtualenv $VENV source $VENV/bin/activate # FINALIZATION service supervisor restart service nginx restart
When I run this I get the following error:
/root/StackScript: line 22: virtualenv: command not found /root/StackScript: line 23: /bin/activate: No such file or directory supervisor: unrecognized service
When I run the command "pip" manually it says it is installed and recognized. What is happening and how can I diagnose this?