mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-29 13:00:32 +01:00
35 lines
404 B
Text
35 lines
404 B
Text
|
#!/bin/sh
|
||
|
|
||
|
kdc_start() {
|
||
|
if [ -x /usr/libexec/kdc ]; then
|
||
|
echo "Starting the kdc service: /usr/libexec/kdc --detach"
|
||
|
/usr/libexec/kdc --detach
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
kdc_stop() {
|
||
|
killall kdc
|
||
|
}
|
||
|
|
||
|
kdc_restart() {
|
||
|
kdc_stop
|
||
|
sleep 1
|
||
|
kdc_start
|
||
|
}
|
||
|
|
||
|
case "$1" in
|
||
|
'start')
|
||
|
kdc_start
|
||
|
;;
|
||
|
'stop')
|
||
|
kdc_stop
|
||
|
;;
|
||
|
'restart')
|
||
|
kdc_restart
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 start|stop|restart"
|
||
|
;;
|
||
|
esac
|
||
|
|