]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - osgi/dist/osgi-boot/src/main/rpm/usr/sbin/osgi-service
c1f4528127d48ab843bd4bbd88f693541e4ef469
4 .
/etc
/osgiboot
/osgi-service-settings.sh
9 if [ -f $CONF_DIR/settings.sh
];then
10 .
$CONF_DIR/settings.sh
13 LIB_DIR
=/usr
/share
/$APP/lib
16 EXEC_DIR
=/var
/lib
/$APP
17 DATA_DIR
=$EXEC_DIR/data
18 CONF_RW
=$EXEC_DIR/conf
21 LOG_FILE
=$LOG_DIR/$APP.log
24 PID_FILE
=$RUN_DIR/$APP.pid
25 SHUTDOWN_FILE
=$RUN_DIR/$APP.shutdown
27 OSGI_INSTALL_AREA
=/usr
/share
/osgiboot
/lib
28 OSGI_FRAMEWORK
=$OSGI_INSTALL_AREA/org.eclipse.osgi.jar
33 if [ -f $PID_FILE ];then
35 kill -0 $PID &> /dev
/null
37 if [ $PID_EXISTS -eq 0 ]; then
38 echo $APP already running with pid
$PID
42 echo Old
$APP process with pid
$PID is dead
, removing
$PID_FILE
47 cp --preserve $CONF_DIR/config.ini
$CONF_RW/config.ini
51 -Dosgi.bundles
="org.argeo.osgi.boot.jar@start" \
52 -Dargeo.osgi.bundles
="$CONF_DIR/modules;in=*,$LIB_DIR;in=*" \
53 -Dargeo.osgi.shutdownFile
="$SHUTDOWN_FILE" \
54 -Dlog4j.configuration
="file:$CONF_DIR/log4j.properties" \
55 $JAVA_OPTS -jar $OSGI_FRAMEWORK \
57 -configuration "$CONF_RW" \
62 #echo Started $APP with pid $PID
67 if [ -f $PID_FILE ];then
69 kill -0 $PID &> /dev
/null
71 if [ $PID_EXISTS -ne 0 ]; then
72 echo Dead
$APP process with pid
$PID, removing
$PID_FILE
78 echo $APP is not running
84 while kill -0 $PID &> /dev/null; do sleep 1; done
87 if [ $TIMEOUT_EXIT -eq 124 ];then
90 echo Killed
$APP with pid
$PID
92 # echo Stopped $APP with pid $PID
99 if [ -f $PID_FILE ];then
102 echo $APP is not running
105 kill -0 $PID &> /dev
/null
107 if [ $PID_EXISTS -eq 0 ]; then
108 echo $APP is running with pid
$PID ...
110 echo No
$APP process with pid
$PID, removing
$PID_FILE
128 echo $
"Usage: $0 {start|stop|status}"