-
Notifications
You must be signed in to change notification settings - Fork 453
SDRangel server with supervisor in OpenSUSE
f4exb edited this page Sep 18, 2018
·
8 revisions
Supervisor is a Python package that makes it very easy to manage processes using a simple web interface This was tested on a Raspberry Pi 3B under OpenSUSE LEAP 15.0
sudo zypper in python2-pip sudo pip install supervisor
This creates /usr/bin/supervisorctl
and /usr/bin/supervisord
and is only the bare minimum.
Create /etc/init.d/supervisord
with this content:
#!/bin/sh ### BEGIN INIT INFO # Provides: supervisord # Required-Start: $network $syslog # Required-Stop: $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Supervisor daemon ### END INIT INFO # Do 'sudo systemctl daemon-reload' to implement and after each change to this file . /lib/lsb/init-functions DAEMON=/usr/bin/supervisord PIDFILE=/var/run/supervisord.pid CONF_FILE=/etc/supervisor/supervisord.conf test -x $DAEMON || exit 5 test -f ${CONF_FILE} || exit 5 case $1 in start) echo -n "Starting supervisor service" "supervisord" /sbin/startproc $DAEMON -n -c ${CONF_FILE} rc_status -v ;; stop) echo -n "Stopping supervisor service" "supervisord" /sbin/killproc -TERM $DAEMON rc_status -v ;; restart|force-reload) $0 stop && sleep 2 && $0 start rc_status ;; status) /sbin/checkproc $DAEMON rc_status -v ;; *) echo "Usage: $0 {start|stop|restart|force-reload|status}" exit2 ;; esac
give it execution permission:
sudo chmod +x /etc/init.d/supervisord
Setup the service
sudo mkdir /var/log/supervisor sudo systemctl enable supervisord
sudo mkdir -p /etc/supervisor/conf.d
Create /etc/supervisor/supervisord.conf
with this content:
; supervisor config file [unix_http_server] file=/var/run/supervisor.sock ; (the path to the socket file) chmod=0700 ; sockef file mode (default 0700) [supervisord] user=root logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log) pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid) childlogdir=/var/log/supervisor ; ('AUTO' child log dir, default $TEMP) logfile_maxbytes = 10MB logfile_backups = 3 loglevel = info [inet_http_server] port = *:9001 ;username = admin ;password = admin [supervisorctl] serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL for a unix socket ; the below section must remain in the config file for RPC ; (supervisorctl/web interface) to work, additional interfaces may be ; added by defining them in separate rpcinterface: sections [rpcinterface:supervisor] supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface ; The [include] section can just contain the "files" setting. This ; setting can list multiple files (separated by whitespace or ; newlines). It can also contain wildcards. The filenames are ; interpreted as relative to this file. Included files *cannot* ; include files themselves. [include] files = /etc/supervisor/conf.d/sdrangelsrv.conf
- Home
- Quick start
- Quick start legacy (v6)
- Hardware requirements
- High DPI displays
- Compile in Linux
- Compile in Windows
- Compile in MacOS
- History and major releases
- Audio related
- Plugins
- Advanced
- Server and API