updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / logkeys / logkeysd.sh
blobf194c8c1ca21911b8fa26159f294cf5448ff8ddd
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 PID=$(pidof -o %PPID /usr/bin/logkeys)
8 start() {
9 stat_busy "Starting logkeys"
11 [ -z "$PID" ] && rm -f /var/run/logkeys.pid && \
12 # logkeys --start --no-func-keys --keymap /usr/share/lkmaps/hu.map 2>/dev/null
13 logkeys--start--command 2>/dev/null
15 if [ $? -gt 0 ]; then
16 stat_fail
17 else
18 add_daemon logkeys
19 stat_done
23 stop() {
24 stat_busy "Stopping logkeys"
26 [ ! -z "$PID" ] && logkeys --kill &> /dev/null
28 if [ $? -gt 0 ]; then
29 stat_fail
30 else
31 rm_daemon logkeys
32 stat_done
36 case "$1" in
37 start)
38 start
40 stop)
41 stop
43 restart)
44 $0 stop
45 sleep 1
46 $0 start
49 echo "usage: $0 {start|stop|restart}"
50 esac
51 exit 0