# HG changeset patch # User Pascal Bellard # Date 1284128717 -7200 # Node ID 1b6281d68d9fd3cedf2994f38e6c9bc46b73e249 # Parent e5b2f931007b4363b7a7f35a76377368348d48c1 apache, chillispot, knock, openerp-server, openssh, portmap, smartmontools, squid, unfs3: use active_pidfile function in start script diff -r e5b2f931007b -r 1b6281d68d9f apache/stuff/apache --- a/apache/stuff/apache Fri Sep 10 11:07:52 2010 +0000 +++ b/apache/stuff/apache Fri Sep 10 16:25:17 2010 +0200 @@ -14,7 +14,7 @@ case "$1" in start) - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE httpd ; then echo "$NAME already running." exit 1 fi @@ -23,7 +23,7 @@ status ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE httpd ; then echo "$NAME is not running." exit 1 fi @@ -33,7 +33,7 @@ status ;; reload) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE httpd ; then echo "$NAME is not running." exit 1 fi @@ -42,7 +42,7 @@ status ;; restart) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE httpd ; then echo "$NAME is not running." exit 1 fi diff -r e5b2f931007b -r 1b6281d68d9f chillispot/stuff/chilli --- a/chillispot/stuff/chilli Fri Sep 10 11:07:52 2010 +0000 +++ b/chillispot/stuff/chilli Fri Sep 10 16:25:17 2010 +0200 @@ -17,7 +17,7 @@ case "$1" in start) - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE chilli ; then echo "$NAME already running." exit 1 fi @@ -25,7 +25,7 @@ status ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE chilli ; then echo "$NAME is not running." exit 1 fi @@ -34,7 +34,7 @@ status ;; restart) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE chilli ; then echo "$NAME is not running." exit 1 fi diff -r e5b2f931007b -r 1b6281d68d9f knock/stuff/etc/init.d/knock --- a/knock/stuff/etc/init.d/knock Fri Sep 10 11:07:52 2010 +0000 +++ b/knock/stuff/etc/init.d/knock Fri Sep 10 16:25:17 2010 +0200 @@ -17,7 +17,7 @@ case "$1" in start) - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE knockd ; then echo "$NAME already running." exit 1 fi @@ -26,7 +26,7 @@ status ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE knockd ; then echo "$NAME is not running." exit 1 fi @@ -35,7 +35,7 @@ status ;; restart) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE knockd ; then echo "$NAME is not running." exit 1 fi diff -r e5b2f931007b -r 1b6281d68d9f openerp-server/stuff/etc/init.d/openerp-server --- a/openerp-server/stuff/etc/init.d/openerp-server Fri Sep 10 11:07:52 2010 +0000 +++ b/openerp-server/stuff/etc/init.d/openerp-server Fri Sep 10 16:25:17 2010 +0200 @@ -25,7 +25,7 @@ case "$1" in start) - if [ -f "$PIDFILE" ]; then + if active_pidfile $PIDFILE python ; then echo "$NAME already running (PID: `cat $PIDFILE`)." exit 1 fi @@ -34,12 +34,12 @@ status sleep 4 # At boot OpenERP dont start correctly if we start it in background. - if [ ! -f "$PIDFILE" ]; then + if ! active_pidfile $PIDFILE python ; then sleep 6 $DAEMON $OPTIONS > $LOGFILE fi ;; stop) - if [ ! -f "$PIDFILE" ]; then + if ! active_pidfile $PIDFILE python ; then echo "$NAME is not running." exit 1 fi diff -r e5b2f931007b -r 1b6281d68d9f openssh/stuff/openssh --- a/openssh/stuff/openssh Fri Sep 10 11:07:52 2010 +0000 +++ b/openssh/stuff/openssh Fri Sep 10 16:25:17 2010 +0200 @@ -25,7 +25,7 @@ echo "Generating $NAME dsa key... " ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -C '' -N '' fi - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE sshd ; then echo "$NAME already running." exit 1 fi @@ -34,7 +34,7 @@ status ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE sshd ; then echo "$NAME is not running." exit 1 fi @@ -43,7 +43,7 @@ status ;; restart) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE sshd ; then echo "$NAME is not running." exit 1 fi diff -r e5b2f931007b -r 1b6281d68d9f portmap/stuff/init.d/portmap --- a/portmap/stuff/init.d/portmap Fri Sep 10 11:07:52 2010 +0000 +++ b/portmap/stuff/init.d/portmap Fri Sep 10 16:25:17 2010 +0200 @@ -19,7 +19,7 @@ case "$1" in start) - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE portmap ; then echo "$NAME already running." exit 1 fi @@ -43,7 +43,7 @@ ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE portmap ; then echo "$NAME is not running." exit 1 fi diff -r e5b2f931007b -r 1b6281d68d9f smartmontools/stuff/etc/init.d/smartd --- a/smartmontools/stuff/etc/init.d/smartd Fri Sep 10 11:07:52 2010 +0000 +++ b/smartmontools/stuff/etc/init.d/smartd Fri Sep 10 16:25:17 2010 +0200 @@ -17,7 +17,7 @@ case "$1" in start) - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE smartd ; then echo "$NAME already running." exit 1 fi @@ -26,7 +26,7 @@ status ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE smartd ; then echo "$NAME is not running." exit 1 fi @@ -35,7 +35,7 @@ status ;; restart) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE smartd ; then echo "$NAME is not running." exit 1 fi diff -r e5b2f931007b -r 1b6281d68d9f squid/stuff/etc/init.d/squid --- a/squid/stuff/etc/init.d/squid Fri Sep 10 11:07:52 2010 +0000 +++ b/squid/stuff/etc/init.d/squid Fri Sep 10 16:25:17 2010 +0200 @@ -19,7 +19,7 @@ case "$1" in start) - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE squid ; then echo "$NAME already running." exit 1 fi @@ -36,7 +36,7 @@ sleep 2 ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE squid ; then echo "$NAME is not running." exit 1 fi @@ -47,7 +47,7 @@ sleep 2 ;; reload) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE squid ; then echo "$NAME is not running." exit 1 fi @@ -56,7 +56,7 @@ status ;; restart) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE squid ; then echo "$NAME is not running." exit 1 fi diff -r e5b2f931007b -r 1b6281d68d9f unfs3/stuff/etc/init.d/unfsd --- a/unfs3/stuff/etc/init.d/unfsd Fri Sep 10 11:07:52 2010 +0000 +++ b/unfs3/stuff/etc/init.d/unfsd Fri Sep 10 16:25:17 2010 +0200 @@ -19,7 +19,7 @@ case "$1" in start) - if [ -f $PIDFILE ] ; then + if active_pidfile $PIDFILE unfsd ; then echo "$NAME already running." exit 1 fi @@ -34,7 +34,7 @@ fi ;; stop) - if [ ! -f $PIDFILE ] ; then + if ! active_pidfile $PIDFILE unfsd ; then echo "$NAME is not running." exit 1 fi