X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=osgi%2Fdist%2Fosgi-boot%2Fsrc%2Fmain%2Frpm%2Fetc%2Fosgiboot%2Fosgi-service-init-functions.sh;fp=osgi%2Fdist%2Fosgi-boot%2Fsrc%2Fmain%2Frpm%2Fetc%2Fosgiboot%2Fosgi-service-init-functions.sh;h=0000000000000000000000000000000000000000;hb=5726aa10afa99c0b21a9ff5c5f9c5e47fc028164;hp=35bf9703f0ea18ec70c23c26c149d4ed037e4e4c;hpb=2fd18c91abdcdd118abef6ce81a1afe3e4d1bfb8;p=lgpl%2Fargeo-commons.git diff --git a/osgi/dist/osgi-boot/src/main/rpm/etc/osgiboot/osgi-service-init-functions.sh b/osgi/dist/osgi-boot/src/main/rpm/etc/osgiboot/osgi-service-init-functions.sh deleted file mode 100644 index 35bf9703f..000000000 --- a/osgi/dist/osgi-boot/src/main/rpm/etc/osgiboot/osgi-service-init-functions.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -# Source function library. -. /etc/rc.d/init.d/functions - -RETVAL=0 - -osgi_service_start() { - APP=$1 - # create log an run directories writable by the application user - USER=$APP - GROUP=$APP - RUN_DIR=/var/run/$APP - LOG_DIR=/var/log/$APP - if [ ! -d $LOG_DIR ];then - mkdir -m 0750 $LOG_DIR - chown -R $USER.$GROUP $LOG_DIR - fi - if [ ! -d $RUN_DIR ];then - mkdir -m 0750 $RUN_DIR - chown -R $USER.$GROUP $RUN_DIR - fi - - # call Argeo Commons OSGi utilities as the application user - daemon --user $USER /usr/sbin/osgi-service $APP start - - RETVAL=$? - #action $"Start $APP" /bin/true - if [ $RETVAL -eq 0 ];then - PID=`cat $RUN_DIR/$APP.pid` - action $"Started $APP with pid $PID" /bin/true - else - action $"Could not start $APP" /bin/false - fi - return $RETVAL -} - -osgi_service_stop() { - APP=$1 - USER=$APP - # call Argeo Commons OSGi utilities as the application user - runuser -s /bin/bash $USER -c "/usr/sbin/osgi-service $APP stop" - RETVAL=$? - if [ $RETVAL -eq 0 ];then - action $"Stopped $APP" /bin/true - else - action $"Could not stop $APP" /bin/false - fi - return $RETVAL -} - -osgi_service_status() { - APP=$1 - USER=$APP - # call Argeo Commons OSGi utilities as the application user - runuser -s /bin/bash $USER -c "/usr/sbin/osgi-service $APP status" - RETVAL=$? - return $RETVAL -}