36 lines
546 B
Bash
36 lines
546 B
Bash
#!/bin/sh
|
|
# Start/stop/restart the glewlwyd daemon
|
|
|
|
glewlwyd_start() {
|
|
if [ -x /usr/bin/glewlwyd ]; then
|
|
echo "Starting Glewlwyd: /usr/bin/glewlwyd"
|
|
/usr/bin/glewlwyd --config=/etc/glewlwyd/glewlwyd.conf &
|
|
fi
|
|
}
|
|
|
|
glewlwyd_stop() {
|
|
echo "Stopping Glewlwyd server"
|
|
/usr/bin/pkill glewlwyd
|
|
}
|
|
|
|
# Restart glewlwyd:
|
|
glewlwyd_restart() {
|
|
glewlwyd_stop
|
|
sleep 1
|
|
glewlwyd_start
|
|
}
|
|
|
|
case "$1" in
|
|
'start')
|
|
glewlwyd_start
|
|
;;
|
|
'stop')
|
|
glewlwyd_stop
|
|
;;
|
|
'restart')
|
|
glewlwyd_restart
|
|
;;
|
|
*)
|
|
echo "usage $0 start|stop|restart"
|
|
esac
|