Skip to content

Instantly share code, notes, and snippets.

@donovan-duplessis
Created August 30, 2012 08:48
Show Gist options
  • Save donovan-duplessis/3524363 to your computer and use it in GitHub Desktop.
Save donovan-duplessis/3524363 to your computer and use it in GitHub Desktop.
dnotifier upstart configuration (service)
# File: dnotifier.conf
# Author: Donovan du Plessis
# Description: dnotifier upstart configuration
# Last Modified: August 30, 2012
description "dnotifier service to generate thumbnails for uploaded images"
author "Donovan du Plessis <donovan@binarytrooper.com>"
# When to start the service
start on (net-device-up
and local-filesystems
and runlevel [2345])
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Process will detach itself to the background
expect fork
# Start the dnotify process
exec start-stop-daemon --chuid uploader --start --exec /usr/bin/dnotify -- -b -MC /home/uploader/trigger -e /usr/local/bin/uploaded_files >> /var/log/dnotifier.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment