View Single Post
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#4
i put the above script in /usr/bin/n9-button-monitor, chmod +x.

i run it on startup with upstart.

/etc/init/n9-button-monitor.conf
Code:
# Description of the script, mandatory
description "Startup script for n9-button-monitor"

# Author e-mail address, mandatory
author "elliot.wolk@gmail.com"

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

#none: stdout to /dev/null
#output: direct stdout to console
console output

#if application exits, restart max 3 times within 300 secs
respawn
#respawn limit 3 300

exec /usr/bin/aegis-exec -s -u user bash -c 'DISPLAY=:0 n9-button-monitor'

Last edited by wolke; 2012-02-24 at 18:52.
 

The Following 3 Users Say Thank You to wolke For This Useful Post: