Fix reload problem in init.d script for RPM
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 24 May 2012 06:46:36 +0000 (08:46 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 24 May 2012 06:46:36 +0000 (08:46 +0200)
The '/etc/init.d/metaproxy reload' in some cases would stop and
not start metaproxy - effectively stopping the service.

rpm/metaproxy.init

index 74fcd68..4e11c37 100755 (executable)
@@ -134,6 +134,7 @@ reload() {
         if [ $RETVAL = 0 ]; then
                killproc -p ${pidfile} -d 10 $DAEMON -USR1
                RETVAL=$?
+               rm -f ${pidfile}
        else
                rc_status -v
                echo $"not reloading due to configuration syntax error"