egrueda

Untitled

Jun 30th, 2017
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.43 KB | None | 0 0
  1. #!/bin/sh
  2. # /etc/init.d/tightvncserver
  3. # Set the VNCUSER variable to the name of the user to start tightvncserver under
  4. VNCUSER='pi'
  5. case "$1" in
  6.   start)
  7.     su $VNCUSER -c '/usr/bin/tightvncserver :1'
  8.     echo "Starting TightVNC server for $VNCUSER"
  9.     ;;
  10.   stop)
  11.     pkill Xtightvnc
  12.     echo "Tightvncserver stopped"
  13.     ;;
  14.   *)
  15.     echo "Usage: /etc/init.d/tightvncserver {start|stop}"
  16.     exit 1
  17.     ;;
  18. esac
  19. exit 0
Add Comment
Please, Sign In to add comment