I have used this script for tightvnc
#!/bin/sh
### BEGIN INIT INFO
# Provides: tightvncserver
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start vnc server
# Description:
### END INIT INFO
case “$1” in
start)
su pi -c ‘vncserver :1 -geometry 1600×900 -depth 16 -pixelformat rgb565:’
echo “VNC Started”
;;
stop)
pkill Xtightvnc
echo “VNC Terminated”
;;
*)
echo “Usage: /etc/init.d/tightvnc {start|stop}”
exit 1
;;
esac
Then while running the following command sudo update-rc.d tightvnc defaults
I am getting error -bash: insserv:: command not found pi@raspberrypi:~ $ insserv: missing `Provides:' entry: please add.
insserv: missing
Required-Start:' entry: please add even if empty. insserv: missing
Required-Stop:' entry: please add even if empty. -bash: command substitution: line 1: unexpected EOF while looking for matching'' -bash: command substitution: line 3: syntax error: unexpected end of file -bash: insserv:: command not found pi@raspberrypi:~ $ insserv: missing
Default-Start:' entry: please add even if empty. insserv: missingDefault-Stop:' entry: please add even if empty. insserv: Default-Start undefined, assuming empty start runlevel(s) for script
tightvnc' -bash: command substitution: line 1: unexpected EOF while looking for matching'' -bash: command substitution: line 3: syntax error: unexpected end of file -bash: insserv:: command not found pi@raspberrypi:~ $ insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script
tightvnc' -bash: syntax error near unexpected token(' pi@raspberrypi:~ $ ^C pi@raspberrypi:~ $ pi@raspberrypi:~ $ clear pi@raspberrypi:~ $ sudo update-rc.d tightvnc defaults insserv: Script tightvnc is broken: incomplete LSB comment. insserv: missing
Provides:' entry: please add. insserv: missingRequired-Start:' entry: please add even if empty. insserv: missing
Required-Stop:' entry: please add even if empty. insserv: missingDefault-Start:' entry: please add even if empty. insserv: missing
Default-Stop:' entry: please add even if empty. insserv: Default-Start undefined, assuming empty start runlevel(s) for scripttightvnc' insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script
tightvnc' pi@raspberrypi:~ $
What is the problem here?