Makefile | 4 ---- atop.init | 20 ++++++++++++++------ atopacct.init | 15 +++++++++++---- atopgpud | 2 +- 4 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 929b0d7..2bdffea 100644 --- a/Makefile +++ b/Makefile @@ -155,19 +155,15 @@ genericinstall: atop atopacctd atopconvert chmod 644 $(DESTDIR)$(DEFPATH)/atop # cp atop $(DESTDIR)$(BINPATH)/atop - chown root $(DESTDIR)$(BINPATH)/atop chmod 04711 $(DESTDIR)$(BINPATH)/atop ln -sf atop $(DESTDIR)$(BINPATH)/atopsar cp atopacctd $(DESTDIR)$(SBINPATH)/atopacctd - chown root $(DESTDIR)$(SBINPATH)/atopacctd chmod 0700 $(DESTDIR)$(SBINPATH)/atopacctd cp atopgpud $(DESTDIR)$(SBINPATH)/atopgpud - chown root $(DESTDIR)$(SBINPATH)/atopgpud chmod 0700 $(DESTDIR)$(SBINPATH)/atopgpud cp atop $(DESTDIR)$(BINPATH)/atop-$(VERS) ln -sf atop-$(VERS) $(DESTDIR)$(BINPATH)/atopsar-$(VERS) cp atopconvert $(DESTDIR)$(BINPATH)/atopconvert - chown root $(DESTDIR)$(BINPATH)/atopconvert chmod 0711 $(DESTDIR)$(BINPATH)/atopconvert cp man/atop.1 $(DESTDIR)$(MAN1PATH) cp man/atopsar.1 $(DESTDIR)$(MAN1PATH) diff --git a/atop.init b/atop.init index e6e11dc..cb87a0d 100755 --- a/atop.init +++ b/atop.init @@ -2,22 +2,28 @@ # # atop Startup script for the Atop process logging in background # -# chkconfig: 2345 96 4 +# chkconfig: - 85 15 # description: Advanced system and process activity monitor # ### BEGIN INIT INFO # Provides: atop # Required-Start: $local_fs # Required-Stop: $local_fs -# Default-Start: 2 3 4 5 +# Default-Start: # Default-Stop: 0 1 6 # Short-Description: Advanced system and process activity monitor # Description: Advanced system and process activity monitor ### END INIT INFO +# Do not load RH compatibility interface. +WITHOUT_RC_COMPAT=1 + # Check existance of binaries [ -f /usr/bin/atop ] || exit 0 +# Source function library. +. /etc/init.d/functions + PIDFILE=/var/run/atop.pid RETVAL=0 @@ -36,7 +42,7 @@ case "$1" in touch /var/lock/subsys/atop ;; - stop) + stop|condstop) # Check if atop runs # if [ -e $PIDFILE ] && ps -p `cat $PIDFILE` | grep 'atop$' > /dev/null @@ -63,18 +69,20 @@ case "$1" in ;; status) + status --pidfile "$PIDFILE" --expect-user root -- atop + RETVAL=$? ;; - reload) + reload|condreload) /usr/share/atop/atop.daily& ;; - restart) + restart|condrestart) /usr/share/atop/atop.daily& ;; *) - echo "Usage: $0 [start|stop|status|reload|restart]" + echo "Usage: $0 [start|stop|status|reload|restart|condstop|condreload|condrestart]" exit 1 esac diff --git a/atopacct.init b/atopacct.init index 1aea1b6..e8fee41 100755 --- a/atopacct.init +++ b/atopacct.init @@ -2,14 +2,14 @@ # # atopacctd Startup script for the atopacctd daemon # -# chkconfig: 2345 91 9 +# chkconfig: - 91 9 # description: Process accounting control # ### BEGIN INIT INFO # Provides: atopacct # Required-Start: $local_fs # Required-Stop: $local_fs -# Default-Start: 2 3 4 5 +# Default-Start: # Default-Stop: 0 1 6 # Short-Description: This daemon switches on process accounting and # transfers the process accounting records 'realtime' @@ -17,9 +17,16 @@ # Description: Process accounting control ### END INIT INFO +# Do not load RH compatibility interface. +WITHOUT_RC_COMPAT=1 + # Check existance of binaries [ -f /usr/sbin/atopacctd ] || exit 0 + +# Source function library. +. /etc/init.d/functions + RETVAL=0 # See how we were called. @@ -59,7 +66,7 @@ case "$1" in touch /var/lock/subsys/atopacctd ;; - stop) + stop|condstop) # Check if atopacctd runs # if ps -e | grep -q atopacctd$ @@ -79,7 +86,7 @@ case "$1" in ;; *) - echo "Usage: $0 [start|stop]" + echo "Usage: $0 [start|stop|condstop]" exit 1 esac diff --git a/atopgpud b/atopgpud index dcb595d..96de509 100755 --- a/atopgpud +++ b/atopgpud @@ -1,4 +1,4 @@ -#!/usr/bin/python -Es +#!/usr/bin/python3 -Es # ============================================================== # Daemon that gathers statistical information from all