5,710
edits
Changes
Ubuntu
,→Upstart to launch/respawn installation
=Upstart to launch/respawn installation=
*create this in /etc/init/facegraft.conf
* <preblockquote> # face graft - face graft job file!upstart description “face grafting installation” author “Robert Twomey <mail@roberttwomey.com”"Face Swap" # Stanzas # # Stanzas Start job via the daemon control when and how a process is started and stoppedscript. Replace "gert" with your username. # See a list of stanzas here: httpexec su -l rtwomey -c 'export DISPLAY=:0; /home/rtwomey/code/openFrameworks/apps/oftwomey/upstart.ubuntu.comgraft-tracker/wikibin/Stanzas#respawngraft-tracker' # When to start Restart the serviceprocess if it dies with a signal start on runlevel [2345] # When to stop or exit code not given by the service'normal exit' stanza. stop on runlevel [016]respawn # Automatically Give up if restart process if crashedoccurs 10 times in 90 seconds. respawn # Essentially lets upstart know the process will detach itself to the background expect fork # Run before process pre-start script [ -d /var/run/facegraft ] || mkdir -p /var/run/facegraft echo "Put bash code here" end script # Start the process exec /home/rtwomey/launch_grafter.shlimit 10 90</preblockquote>
=UVC / webcam control in ubuntu=