Wednesday 7 February 2018

How to make things start automatically upstart

To run things on boot with upstart add a conf file to /etc/init/
Here is my windowfunctions conf file on my linode:


start on runlevel [2345]
stop on runlevel [!2345]

script
 chdir /home/andy/window_funcs/
 export PATH="/root/.cargo/bin:$PATH"
 export ROCKET_ENV="prod"
 echo "path is: $PATH"
 exec cargo +nightly run --release .
end script

To view the logs for upstart, all logs are stored in /var/log/upstart/:

cat /var/log/upstart/windowfunctions.log

Try adding to:
/etc/rc0.local

No comments:

Post a Comment