summaryrefslogtreecommitdiffstats
path: root/wrappers/initscript.in
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/initscript.in')
-rw-r--r--wrappers/initscript.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/wrappers/initscript.in b/wrappers/initscript.in
index 9f4676fe..9223ebac 100644
--- a/wrappers/initscript.in
+++ b/wrappers/initscript.in
@@ -139,9 +139,8 @@ start() {
if [ -f $pidfile ]; then
pid=`cat $pidfile`
instlockfile="@localstatedir@/lock/@package_name@/slapd-$instance/server/$pid"
- if kill -0 $pid && \
- [ $(awk '{print $2}' /proc/$pid/stat) = "(ns-slapd)" ] \
- > /dev/null 2>&1 ; then
+ name=`ps -p $pid | tail -1 | awk '{ print $4 }'`
+ if kill -0 $pid && [ $name = "ns-slapd" ]; then
echo_n " already running"
success; echo
successes=`expr $successes + 1`