forked from raspberrypilearning/teachers-classroom-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvncproxy
More file actions
executable file
·38 lines (31 loc) · 732 Bytes
/
vncproxy
File metadata and controls
executable file
·38 lines (31 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
### BEGIN INIT INFO
# Provides: vncproxy
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VNC http Proxy at boot time
# Description: Start VNC http Proxy at boot time.
### END INIT INFO
#!/bin/sh
#/etc/init.d/vncproxy
USER=root
HOME=/root
export USER HOME
case "$1" in
start)
echo "Starting VNC Proxy..."
screen -S noVNC -dms noVNC /usr/local/share/noVNC/utils/launch.sh --vnc localhost:5901 --listen 80
echo "...done (VNC Proxy)"
;;
stop)
echo "Stopping VNC Proxy..."
screen -x noVNC -X stuff "^C"
echo "...done (VNC Proxy)"
;;
*)
echo "Usage: /etc/init.d/vncproxy {start|stop}"
exit 1
;;
esac
exit 0