Skip to content

Instantly share code, notes, and snippets.

@nathanielks
Created September 16, 2016 23:20
Show Gist options
  • Select an option

  • Save nathanielks/379e1a1e4df130516b7d21204ec17c5c to your computer and use it in GitHub Desktop.

Select an option

Save nathanielks/379e1a1e4df130516b7d21204ec17c5c to your computer and use it in GitHub Desktop.

Revisions

  1. nathanielks created this gist Sep 16, 2016.
    23 changes: 23 additions & 0 deletions personal-vnc.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # /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