I'm trying to create an upstart script to run a python script on startup. In theory it looks simple enough but I just can't seem to get it to work. I'm using a skeleton script I found here and altered.
I'm trying to set up an Ubuntu (12.04 LTS) upstart script to manage Trac's built in web server as an upstream server for nginx.
Here is my init script /etc/init/tracd.conf.
I've written an upstart script I want to run when my server starts up, only it does not.
I want my python program sample.py to be always up and running. I have read some things and asked people about ways to do this. So far I have following options -
Upstart
Cron
I am trying things with upstart right now. I have created a sample.conf in $HOME/.init/.
Can I do This start up service below, there are no errors showing once run, but the server script below does not run!
ln /lib/systemd/aquarium.service aquarium.service
systemctl daemon-reload
systemctl enable aquarium.service
systemctl start aquarium.service
thanks
aquarium.service:
[Unit]
Description=Start aquarium server
[Service]
WorkingDirectory=/home/root/python/code/aquarium/
ExecStart
I have a python script that looks files up in a relative directory. For example: the python script is in /home/username/projectname/. I have a file that is being called within the python script that is in /home/username/projectname/subfolder.
If I run the script from the shell as python scriptname.py it runs perfectly fine.
However, i'm trying to run the script as a startup service.
I am using Raspbian on a Raspberry Pi. I have a Python script (LCD.py) that controls an LCD running as a service using supervisord.
I would like to able to enter a message on my web page and have it displayed on the LCD.
I have got e.g. two servers with Apache and Postfix and a virtual IP (from heartbeat-1). Well, heartbeat is working well and it is simple to deal with complete server outages, but how can I configure heartbeat, so that it also switches the server, if one of the above services fail?
I have a script `openerp-server.py` in `~/openerp/stable6/server/bin/`.I want it to be run at startup.(As a service or not - I don't know the difference)
These are the steps I followed
1 Created a script 'openerp-server' with the following lines in `/etc/init.d/`
#!/bin/sh
cd ~/openerp/stable6/server/bin/
exec /usr/bin/python ./openerp-server.py $@
2 Made the script executable by u