MMCT TEAM
Server IP : 192.185.129.71  /  Your IP : 3.14.145.69
Web Server : Apache
System : Linux bh-ht-3.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : svymadmin ( 4072)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /etc/rc2.d/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //etc/rc2.d/S99superq
#!/bin/bash
# chkconfig: 345 99 1
#
#       /etc/rc.d/init.d/superq
#
#       Freezes process trees and queues them based on definition patterns.
#
# description: Freezes process trees and queues them based on definition patterns. \
#   This is a sledgehammer solution for unpredictable launching processes \
#   which should not be used if there is a more proper method.
# processname: superq.py

# Source function library.
. /etc/init.d/functions

superq_file='/opt/hgmods/automated_monitoring/superq'

start() {
        echo -n "Starting superq: "
        daemon "$superq_file"
        echo
        return $?
}

reload() {
        echo -n "Reloading superq: "
        if pkill -USR1 -o superq &>/dev/null;then
            success
        else
            failure
        fi
        echo
        return $?
}

stop() {
        echo -n "Shutting down superq: "
        killproc "$superq_file"
        echo
        return $?
}

status() {
        if ps x|grep -q "${superq_file}$"; then
                echo "superq is running."
                return 0
        else
                echo "superq is not running."
                return 1
        fi
}

case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    status)
        status
        ;;
    restart)
        stop
        start
        ;;
    reload)
        reload
        ;;
    condrestart)
        echo "Unsupported."
        ;;
    probe)
        echo "Unsupported."
        ;;
    *)
        echo "Usage: <servicename> {start|stop|status|restart"
        exit 1
        ;;
esac
exit

MMCT - 2023