]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- pidfile var
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 7 Dec 2010 14:08:52 +0000 (14:08 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 7 Dec 2010 14:08:52 +0000 (14:08 +0000)
svn-id: @11973

rc.d/init.d/template.init

index 94cecfc10d5f823f6e6b5534750b66b92b7b596c..79122e7a39cc27ed9ae2fb22687f1b0f7c256c5f 100644 (file)
@@ -37,6 +37,8 @@ OPTION4=5     #
 # Get service config - may override defaults
 [ -f /etc/sysconfig/<service> ] && . /etc/sysconfig/<service>
 
+pidfile="/var/run/<service>.pid"
+
 # configtest itself
 # must return non-zero if check failed
 # output is discarded if checkconfig is ran without details
@@ -97,7 +99,7 @@ stop() {
        # Stop daemons.
        msg_stopping "<service_name>"
        killproc <procname>
-       killproc --pidfile /var/run/<service>.pid <procname> -TERM
+       killproc --pidfile $pidfile <procname> -TERM
        rm -f /var/lock/subsys/<service>
 }
 
@@ -111,7 +113,7 @@ reload() {
        checkconfig
        msg_reloading "<service_name>"
        killproc <procname> -HUP
-       killproc --pidfile /var/run/<service>.pid <procname> -HUP
+       killproc --pidfile $pidfile <procname> -HUP
        RETVAL=$?
 }
 
@@ -158,8 +160,8 @@ case "$1" in
        ;;
   status)
        status <service>
-       status --pidfile /var/run/<service>.pid <service>
-       status --pidfile /var/run/<service>.pid <service> <procname>
+       status --pidfile $pidfile <service>
+       status --pidfile $pidfile <service> <procname>
        RETVAL=$?
        ;;
   *)
This page took 0.048138 seconds and 4 git commands to generate.