slitaz-base-files view rootfs/etc/init.d/rc.functions @ rev 301

Make explanations about 'w' for translators; make pot; make msgmerge
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sun Mar 27 11:52:32 2016 +0300 (2016-03-27)
parents c2f69fa0c490
children 78038351c7c8
line source
1 #!/bin/sh
2 # /etc/init.d/rc.functions: SliTaz boot scripts functions.
3 #
5 . /lib/libtaz.sh
7 # Check daemon with pidfile: usage check_pidfile $PIDFILE $DAEMON
8 active_pidfile()
9 {
10 if [ ! -e $1 ]; then
11 return 1
12 elif grep -qs "Name:.$(basename $2)$" \
13 /proc/$(sed 's/[^0-9]//g' < $1 | head -n 1)/status ; then
14 return 0
15 else
16 rm -f $1
17 return 2
18 fi
19 }