43 lines
830 B
Plaintext
43 lines
830 B
Plaintext
|
#! /bin/sh
|
||
|
# start/stop logoutd
|
||
|
|
||
|
set -e
|
||
|
|
||
|
DAEMON=/usr/sbin/logoutd
|
||
|
test -f $DAEMON || exit 0
|
||
|
|
||
|
# Most people won't need logoutd(8) running, so we'll only run it if
|
||
|
# /etc/porttime has non-comment lines.
|
||
|
egrep -vq '^#|^ *$' /etc/porttime || exit 0
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
echo -n "Starting login time and port restriction enforcer: logoutd"
|
||
|
start-stop-daemon --start --quiet --exec $DAEMON
|
||
|
echo "."
|
||
|
;;
|
||
|
stop)
|
||
|
echo -n "Stopping login time and port restriction enforcer: logoutd"
|
||
|
start-stop-daemon --stop --quiet --exec $DAEMON
|
||
|
echo "."
|
||
|
;;
|
||
|
restart)
|
||
|
$0 stop
|
||
|
$0 start
|
||
|
;;
|
||
|
reload)
|
||
|
echo -n "Reloading logoutd configuration..."
|
||
|
start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
|
||
|
echo "done."
|
||
|
;;
|
||
|
force-reload)
|
||
|
$0 reload
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: /etc/init.d/logoutd start|stop"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
exit 0
|