[packages/lightdm] lightdm.init: handle exit code, use pidfile

glen glen at pld-linux.org
Sun Mar 2 11:14:42 CET 2014


commit 12b2321e04edc8c7289e02f26c178eb52b15781b
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun Mar 2 09:42:40 2014 +0000

    lightdm.init: handle exit code, use pidfile

 lightdm.init | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/lightdm.init b/lightdm.init
index fcde977..b640c93 100755
--- a/lightdm.init
+++ b/lightdm.init
@@ -12,6 +12,8 @@
 
 upstart_controlled
 
+pidfile=/var/run/lightdm.pid
+
 start() {
 	# Check if the service is already running?
 	if [ -f /var/lock/subsys/lightdm ]; then
@@ -20,8 +22,7 @@ start() {
 	fi
 
 	msg_starting "Lightdm Display Manager"
-	daemon /usr/sbin/lightdm
-	ok
+	daemon --pidfile $pidfile /usr/sbin/lightdm --pidfile $pidfile
 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/lightdm
 }
 
@@ -33,7 +34,7 @@ stop() {
 
 	# Stop daemons.
 	msg_stopping "Lightdm Display Manager"
-	killproc lightdm
+	killproc --pidfile $pidfile lightdm
 	rm -f /var/lock/subsys/lightdm
 }
 
@@ -68,7 +69,7 @@ case "$1" in
 	condrestart 7
 	;;
   status)
-	status lightdm
+	status --pidfile $pidfile lightdm
 	RETVAL=$?
 	;;
   *)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lightdm.git/commitdiff/7b654e9839d96780f17ddddb7b6fc548859a7401



More information about the pld-cvs-commit mailing list