version 0.2.5
[expresskeys.git] / old-extra / expresskeys-terminate.sh
1 #!/bin/sh
2
3 # Terminate expresskeys by its PID number.
4
5 if [ -f ~/.expresskeys/expresskeys.pid ]; then
6
7    echo "Will try to terminate expresskeys."
8
9    kill -TERM `cat ~/.expresskeys/expresskeys.pid | head -n 1`
10
11    sleep 1
12
13    if ! [ -f ~/.expresskeys/expresskeys.pid ]; then
14       echo "Success!"
15    else
16       echo "Failure!"
17    fi
18
19 else
20
21    echo "expresskeys doesn't seem to be running as a daemon..."
22
23 fi
24