]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - nodectl
0aba3dc59c192d0a54a5eb44d04fbab68f4aa2dc
6 # Directories and files
8 CONF_DIRS
=/etc
/$APP/conf.d
9 BASE_POLICY_ALL
=/usr
/share
/$APP/all.policy
10 BASE_CONFIG_INI
=/usr
/share
/$APP/config.ini
12 EXEC_DIR
=/var
/lib
/$APP
13 DATA_DIR
=$EXEC_DIR/data
14 CONF_RW
=$EXEC_DIR/state
15 CONFIG_INI
=$CONF_RW/config.ini
17 OSGI_INSTALL_AREA
=/usr
/share
/osgi
/boot
18 OSGI_FRAMEWORK
=$OSGI_INSTALL_AREA/org.eclipse.osgi.jar
21 if [ -f $CONF_DIR/settings.sh
];then
22 .
$CONF_DIR/settings.sh
32 echo ## Equinox configuration - Generated by /usr/sbin/nodectl > $CONFIG_INI
33 cat $BASE_CONFIG_INI >> $CONFIG_INI
34 cat $CONF_DIR/$APP.ini
>> $CONFIG_INI
35 for file in `ls -v $CONF_DIRS/*.ini`; do
36 echo "\n# $file\n" >> $CONFIG_INI;
37 cat $file >> $CONFIG_INI
42 -Dlog4j.configuration
="file:$CONF_DIR/log4j.properties" \
43 $JAVA_OPTS -jar $OSGI_FRAMEWORK \
44 -configuration "$CONF_RW" \
49 echo Not yet implemented
53 if [ -f $PID_FILE ];then
55 kill -0 $PID &> /dev
/null
57 if [ $PID_EXISTS -ne 0 ]; then
58 echo Dead
$APP process with pid
$PID, removing
$PID_FILE
64 echo $APP is not running
69 # notifies application by removing the shutdown file
70 # rm -f $SHUTDOWN_FILE
73 # wait 10 min for application to shutdown, then kill it
76 while kill -0 $PID &> /dev
/null
80 DURATION
=$
(($NOW-$BEGIN))
81 if [ $DURATION -gt $TIMEOUT ]; then
83 echo Forcibly killed
$APP with pid
$PID
94 if [ -f $PID_FILE ];then
97 echo $APP is not running
100 kill -0 $PID &> /dev
/null
102 if [ $PID_EXISTS -eq 0 ]; then
103 echo $APP is running with pid
$PID ...
105 echo No
$APP process with pid
$PID, removing
$PID_FILE
126 echo $
"Usage: $0 {start|stop|status}"