2010-05-11 15:18:35 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Start/stop/restart the conserver console server daemon.
|
|
|
|
|
|
|
|
# Start conserver:
|
|
|
|
conserver_start() {
|
|
|
|
if [ -x /usr/sbin/conserver -a -d /var/consoles ]; then
|
|
|
|
echo "Starting conserver: /usr/sbin/conserver -d -v"
|
|
|
|
/usr/sbin/conserver -d -v
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# Stop conserver:
|
|
|
|
conserver_stop() {
|
|
|
|
/bin/killall conserver
|
|
|
|
}
|
|
|
|
|
|
|
|
# Restart conserver:
|
|
|
|
conserver_restart() {
|
|
|
|
conserver_stop
|
|
|
|
/bin/sleep 1
|
|
|
|
conserver_start
|
|
|
|
}
|
|
|
|
|
2010-05-13 00:39:58 +02:00
|
|
|
# Reload conserver:
|
2010-05-11 15:18:35 +02:00
|
|
|
conserver_reload() {
|
|
|
|
/bin/killall -HUP conserver
|
|
|
|
}
|
|
|
|
|
2010-05-13 00:39:58 +02:00
|
|
|
# Reconnect to any consoles that seem down:
|
2010-05-11 15:18:35 +02:00
|
|
|
conserver_reconnect() {
|
|
|
|
/bin/killall -USR1 conserver
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
'start')
|
|
|
|
conserver_start
|
|
|
|
;;
|
|
|
|
'stop')
|
|
|
|
conserver_stop
|
|
|
|
;;
|
|
|
|
'restart')
|
|
|
|
conserver_restart
|
|
|
|
;;
|
|
|
|
'reload')
|
|
|
|
conserver_reload
|
|
|
|
;;
|
|
|
|
'reconnect')
|
|
|
|
conserver_reconnect
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "usage $0 start|stop|restart|reload|reconnect"
|
|
|
|
esac
|
|
|
|
|