Reputation: 15602
As I found a blocker in one approach to make a Django app production ready I've gone with a different approach documented here.
In particular, this question is about this step where it says «Restart Apache for the changes to be taken into effect» and has the following associated command
sudo /opt/bitnami/ctlscript.sh restart apache
Thing is, ctlscript.sh isn't in that folder but in /opt/bitnami/stack. Then, when running in that forder
sudo ctlscript.sh restart apache
I get this error
sudo: ctlscript.sh: command not found
The file is there so I thought it would be something related with permissions (as pointed here).
The script is in the right folder, so the problem points to incorrect permissions.
sudo chmod 755 ctlscript.sh
but running the command to restart Apache got me into the same "command not found" error.
Upvotes: 1
Views: 12987
Reputation: 131
The following worked for me (I was getting a command not found error too):
sudo /opt/bitnami/ctlscript.sh restart apache
Taken from https://docs.bitnami.com/aws/faq/administration/control-services/
Upvotes: 1
Reputation: 201028
"command not found" does not point to "incorrect permissions". You're getting errors because the script is not in your PATH
. There's two ways you can go this
Run
pwd
and you will get the full path. If you get /home/bitnami/stack
, then, run
sudo /home/bitnami/stack/ctlscript.sh restart apache
Run
sudo ./ctlscript.sh restart apache
and that will work too
Upvotes: 4