diff options
Diffstat (limited to 'source/l/ConsoleKit/rc.consolekit')
-rw-r--r-- | source/l/ConsoleKit/rc.consolekit | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/source/l/ConsoleKit/rc.consolekit b/source/l/ConsoleKit/rc.consolekit new file mode 100644 index 00000000..a1937569 --- /dev/null +++ b/source/l/ConsoleKit/rc.consolekit @@ -0,0 +1,34 @@ +#!/bin/sh +# +# /etc/rc.d/rc.consolekit +# +# Start/stop consolekit-kit daemon. +# +# This daemon is used by polkit's console auth agent. + +# Start consolekit: +ck_start() { + echo "Starting ConsoleKit daemon: /usr/sbin/console-kit-daemon" + /usr/sbin/console-kit-daemon +} + +# Stop consolekit: +ck_stop() { + if [ -r /var/run/ConsoleKit/pid ]; then + kill -HUP $(cat /var/run/ConsoleKit/pid) + rm -f /var/run/ConsoleKit/pid + else + killall -HUP -q console-kit-daemon + fi +} + +case "$1" in +'start') + ck_start + ;; +'stop') + ck_stop + ;; +*) + echo "Usage: $0 start|stop" +esac |