#!/bin/sh # # $Id$ # # start osgi-runner after installing the package # if systemctl is-enabled osgi-runner.service ; then if [ "$1" = "triggered" ] ; then PSLIST=$(ps -f) if echo $PSLIST | grep -q -- --auto-deconfigure then echo "osgi-runner-server.postinst triggered with --auto-deconfigure, skipping osgi-runner start." else echo "osgi-runner-server.postinst triggered, starting osgi-runner if not yet running." service osgi-runner status > /dev/null || service osgi-runner start || /bin/true exit 0 fi else echo "Trying to start osgi-runner if not yet running." service osgi-runner status > /dev/null || service osgi-runner start || /bin/true fi else echo "Not automatically starting disabled osgi-runner.service." echo "Please run systemctl enable osgi-runner and/or systemctl start osgi-runner" fi