Package: atop
Version: 1.23-1
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: initd-status-support
Here is a patch to support the "status" action in the init.d script.
diff -u atop-1.23/debian/control atop-1.23/debian/control
--- atop-1.23/debian/control
+++ atop-1.23/debian/control
@@ -8,7 +8,7 @@
Package: atop
Architecture: any
-Depends: ${shlibs:Depends}, logrotate
+Depends: ${shlibs:Depends}, logrotate, lsb-base (>= 3.2-13)
Description: Monitor for system resources and process activity
Atop is an ASCII full-screen performance monitor, similar to the top command,
but atop only shows the active system-resources and processes, and only shows
diff -u atop-1.23/debian/init.d atop-1.23/debian/init.d
--- atop-1.23/debian/init.d
+++ atop-1.23/debian/init.d
@@ -27,6 +27,8 @@
test -x $DAEMON || exit 0
+. /lib/lsb/init-functions
+
set -e
case "$1" in
@@ -53,10 +55,12 @@
start-stop-daemon --start --background --quiet --exec $DAEMON -- $DARGS
echo "$NAME."
;;
+ status)
+ status_of_proc $DAEMON $NAME
+ ;;
*)
N=/etc/init.d/$NAME
- # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
- echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
exit 1
;;
esac