Skip to content

Instantly share code, notes, and snippets.

@nathanielks
Created September 16, 2016 23:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nathanielks/379e1a1e4df130516b7d21204ec17c5c to your computer and use it in GitHub Desktop.
Save nathanielks/379e1a1e4df130516b7d21204ec17c5c to your computer and use it in GitHub Desktop.
# /etc/init/personal-vnc.conf
# Use the service command:
# sudo service personal-vnc {start,stop,restart,status}
#
description "Manages VNC connection. Runs on boot"
start on runlevel [2345]
stop on runlevel [06]
setuid YOUR_USER_HERE
setgid YOUR_GROUP_HERE
respawn
respawn limit 3 30
# normal exit codes, it just respawns.
normal exit 0 TERM
script
exec /bin/bash /path/to/script.sh
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment