SVN: rc-scripts/trunk/rc.d/init.d/template.init

glen glen at pld-linux.org
Tue Dec 7 15:08:52 CET 2010


Author: glen
Date: Tue Dec  7 15:08:52 2010
New Revision: 11973

Modified:
   rc-scripts/trunk/rc.d/init.d/template.init
Log:
- pidfile var

Modified: rc-scripts/trunk/rc.d/init.d/template.init
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/template.init	(original)
+++ rc-scripts/trunk/rc.d/init.d/template.init	Tue Dec  7 15:08:52 2010
@@ -37,6 +37,8 @@
 # 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 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 @@
 	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 @@
 	;;
   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=$?
 	;;
   *)


More information about the pld-cvs-commit mailing list