description "Visokio Omniscope Server Service" author "Visokio" # This OS user account must be the account that Omniscope was activated with, # and the installation account if installed per user. env USER=visokio # The absolute path to the installation folder - typically /home/USERNAME/visokio-omniscope # for a per-user installation, or /opt/visokio-omniscope for a system-wide installation. env INSTALL_DIR=/home/visokio/visokio-omniscope # The file to log service messages to. env LOG_FILE=/var/log/omniscope-server-service.log # Start the service on level 2, 3, 4, and 5 start on runlevel [2345] # Stop the service on shutdown stop on shutdown or runlevel [!2345] # Give up if restart occurs more than 3 times in 150 seconds. respawn limit 3 150 # Specify main command as a shell script instead of a single-line command. # Uses authbind to bind to port 80 and 443 exec su -s /bin/sh -c 'exec /usr/bin/authbind "$0" "$@"' $USER -- --deep "$INSTALL_DIR/omniscope-server-headless.sh" > $LOG_FILE 2>&1 # Will try to restart the process if killed respawn