Skip to content

Instantly share code, notes, and snippets.

@lyoshenka
Last active August 29, 2015 14:00
Show Gist options
  • Save lyoshenka/11239365 to your computer and use it in GitHub Desktop.
Save lyoshenka/11239365 to your computer and use it in GitHub Desktop.
Upstart script for Redshift (http://jonls.dk/redshift/)
# Redshift upstart script
#
# IMPORTANT: you have to specify your lat/lng manually, or redshift won't start. Either put
# it in your config file or pass it explicitly
#
description "Redshift"
start on runlevel [2345]
stop on runlevel [!2345]
env DISPLAY=":0"
export DISPLAY
# Option 1
setuid YOUR_USER
setgid YOUR_USER
exec /usr/local/bin/redshift
# Option 2
# exec /usr/local/bin/redshift -c /path/to/redshift.conf
# Option 3
# exec /usr/local/bin/redshift -l LAT:LNG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment