blob: ef440bab1f4534f3ae9a7d062c5705b82a63073c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/bin/sh
#
# Wrapper for msecgui
#
if [ "`whoami`" != "root" ]; then
echo 'msec: sorry, you must be root !'
exit 1
fi
LCK=/var/run/msec.pid
function cleanup() {
rm -f $LCK
}
if [ -f $LCK ]; then
if [ -d /proc/`cat $LCK` ]; then
exit 0
else
rm -f $LCK
fi
fi
echo -n $$ > $LCK
trap cleanup 0
MSEC=/usr/share/msec/msecgui.py
OPT="$@"
exec $MSEC $OPT
# msec ends here
|