Last active
November 26, 2019 09:06
-
-
Save lasekmiroslaw/1beeb7c5d5017e75f899cba2cd0c76bf to your computer and use it in GitHub Desktop.
supervisor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/supervisord.d | |
#!/bin/sh | |
## | |
## /etc/rc.d/init.d/supervisord | |
## | |
## Supervisor is a client/server system that | |
## allows its users to monitor and control a | |
## number of processes on UNIX-like operating | |
## systems. | |
## | |
## chkconfig: - 64 36 | |
## description: Supervisor Server | |
## processname: supervisord | |
# | |
## Source init functions | |
. /etc/rc.d/init.d/functions | |
prog="supervisord" | |
prefix="/usr/bin/" | |
exec_prefix="${prefix}" | |
prog_bin="${exec_prefix}/supervisord -c /home/drophub/application/default.conf" | |
PIDFILE="/var/run/$prog.pid" | |
start() | |
{ | |
echo -n $"Starting $prog: " | |
daemon $prog_bin --pidfile $PIDFILE | |
sleep 1 | |
[ -f $PIDFILE ] && success $"$prog startup" || failure $"$prog startup" | |
echo | |
} | |
stop() | |
{ | |
echo -n $"Shutting down $prog: " | |
[ -f $PIDFILE ] && sleep 1 && killproc $prog || success $"$prog shutdown" | |
echo | |
} | |
-- INSERT -- 1,10 Top |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
supervisord -c default.conf | |
systemctl daemon-reload | |
systemctl enable supervisord.service | |
systemctl start supervisord.service | |
ps -ef | grep supervisord | |
https://stackoverflow.com/questions/31157928/supervisord-on-linux-centos-7-only-works-when-run-with-root | |
add to /etc/supervisord.conf | |
include=supervisor.d/yourconf.conf | |
/etc/supervisord.d | |
/usr/bin/supervisord -c /etc/supervisord.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment