Get the App
SLTechnology News&Howtos  ›  Servers  › 

Install supervisor

Shulou Source: shulou.com Published: 2022-06-02 10:59:42 10月03日 Update

1. Supervisor installation file, the installation command is: sh supervisor_install.sh

#! / bin/bashyum-y install python-setuptoolseasy_install 'supervisor==3.3.4'echo "alias' supervisorctl'='supervisorctl-c / opt/superctl/etc/supervisor.conf'" > > ~ / .bashrcmkdir-p / opt/superctl/bin/mkdir-p / opt/superctl/log/mkdir-p / opt/superctl/etc/chmod-R 755 / opt/superctl/bin/chmod 755 / opt/superctl/supervisor.shcd / opt/superctl/etc/cat > supervisor.conf test.supervisor.temple & 2 RETVAL=2} start () {if [- e / opt/superctl/etc/supervisor.conf] Then if [`ps-ef | grep "/ opt/superctl/etc/supervisor.conf" | grep-v grep | wc-l`-ne 0] Then sleep 1 echo "/ opt/superctl/etc/supervisor.conf process is running" ps-ef | grep "/ opt/superctl/etc/supervisor.conf" | grep-v grep else sleep 1 / bin/supervisord-c / opt/superctl/etc/supervisor.conf Fi fi} stop () {if [`ps-ef | grep "/ opt/superctl/etc/supervisor.conf" | grep-v grep | wc-l`-eq 1] Then supervisorctl stop all sleep 4 / bin/supervisorctl shutdownfi} status () {/ bin/supervisorctl status} restart () {stop sleep 3 start} case "$1" in stop) stop;; status) status;; restart) restart;; start) start;; *) usage;; esacexit $RETVA

3. Start the command:

Sh supervisor.sh start | stop | restart

Tags: Files commands in progress directories processes runs configurations Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Xiaomi vpn Huawei Redmi