Skip to content

Instantly share code, notes, and snippets.

@lasekmiroslaw
Last active November 26, 2019 09:06
Show Gist options
  • Save lasekmiroslaw/1beeb7c5d5017e75f899cba2cd0c76bf to your computer and use it in GitHub Desktop.
Save lasekmiroslaw/1beeb7c5d5017e75f899cba2cd0c76bf to your computer and use it in GitHub Desktop.
supervisor
/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
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