I am writing my first autostartup init.d script with a fresh instance of ubuntu amazon EC2 and I can't run it without sudo .
ubuntu@ip-172-31-XX-XXX:~$ /etc/init.d/codebox start
Starting codebox
/etc/init.d/codebox: 44: /etc/init.d/codebox: nvm: not found
/etc/init.d/codebox: 50: /etc/init.d/codebox: cannot create /var/run/codebox.pid: Permission denied
/etc/init.d/codebox: 46: /etc/init.d/codebox: cannot create /var/log/codebox.log: Permission denied
Unable to start, see /var/log/codebox.log and /var/log/codebox.err
If I run it with sudo it ill work but I don't konw how safe it is.
(Side question. If i edit the script and add just after cd "$dir" nvm use 0.12.7 nvm command is not found. Are there restrictions in what you can put inside an init.d script )
I am writing my first autostartup init.d script with a fresh instance of ubuntu amazon EC2 and I can't run it without sudo .
ubuntu@ip-172-31-XX-XXX:~$ /etc/init.d/codebox start Starting codebox /etc/init.d/codebox: 44: /etc/init.d/codebox: nvm: not found /etc/init.d/codebox: 50: /etc/init.d/codebox: cannot create /var/run/codebox.pid: Permission denied /etc/init.d/codebox: 46: /etc/init.d/codebox: cannot create /var/log/codebox.log: Permission denied Unable to start, see /var/log/codebox.log and /var/log/codebox.errIf I run it with sudo it ill work but I don't konw how safe it is.
(Side question. If i edit the script and add just after
cd "$dir"nvm use 0.12.7nvm command is not found. Are there restrictions in what you can put inside an init.d script )