Standarized all rc scripts.
authorkloczek <kloczek@pld-linux.org>
Sun, 18 Jul 1999 02:03:49 +0000 (02:03 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    atd.init -> 1.4

atd.init

index 5bd1f5a..9ea2d17 100644 (file)
--- a/atd.init
+++ b/atd.init
@@ -1,29 +1,33 @@
 #!/bin/sh
 #
-#      /etc/rc.d/init.d/atd
+# atd          Runs commands scheduled by the at command
 #
-# Starts the at daemon
+# chkconfig:   345 40 60
 #
-# chkconfig: 345 40 60
-# description: Runs commands scheduled by the at command at the time \
-#    specified when at was run, and runs batch commands when the load \
-#    average is low enough.
-# processname: atd
+# description: Runs commands scheduled by the at command at the time \
+#              specified when at was run, and runs batch commands when \
+#              the load average is low enough.
+#
+# processname: atd
+
 
-# Source function library.
+# Source function library
 . /etc/rc.d/init.d/functions
 
-# Try get sysconfig ...
-if [ -f /etc/sysconfig/at ]; then
-    . /etc/sysconfig/at
-fi    
+# Get service config
+[ -f /etc/sysconfig/atd ] && . /etc/sysconfig/atd
 
-#      See how we were called.
-#
+
+# See how we were called.
 case "$1" in
   start)
-       show Starting at daemon
-        daemon atd
+       # Check if the service is already running?
+       if [ ! -f /var/lock/subsys/atd ]; then
+               show Starting at daemon
+               daemon atd
+       else
+               echo "atd already is running"
+       fi
         touch /var/lock/subsys/atd
        ;;
   stop)
This page took 0.031796 seconds and 4 git commands to generate.