]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - dist/argeo-node/rpm/usr/sbin/argeoctl
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 printf "## Equinox configuration - Generated by /usr/sbin/nodectl ##\n\n" > $CONFIG_INI
33 cat $BASE_CONFIG_INI >> $CONFIG_INI
34 printf "\n##\n## $CONF_DIR/$APP.ini\n##\n\n" >> $CONFIG_INI
35 cat $CONF_DIR/$APP.ini
>> $CONFIG_INI
36 for file in `ls -v $CONF_DIRS/*.ini`; do
37 printf "\n##\n## $file\n##\n\n" >> $CONFIG_INI
38 cat $file >> $CONFIG_INI
43 -Dlog4j.configuration
="file:$CONF_DIR/log4j.properties" \
44 $JAVA_OPTS -jar $OSGI_FRAMEWORK \
45 -configuration "$CONF_RW" \
50 echo Not yet implemented
54 if [ -f $PID_FILE ];then
56 kill -0 $PID &> /dev
/null
58 if [ $PID_EXISTS -ne 0 ]; then
59 echo Dead
$APP process with pid
$PID, removing
$PID_FILE
65 echo $APP is not running
70 # notifies application by removing the shutdown file
71 # rm -f $SHUTDOWN_FILE
74 # wait 10 min for application to shutdown, then kill it
77 while kill -0 $PID &> /dev
/null
81 DURATION
=$
(($NOW-$BEGIN))
82 if [ $DURATION -gt $TIMEOUT ]; then
84 echo Forcibly killed
$APP with pid
$PID
95 if [ -f $PID_FILE ];then
98 echo $APP is not running
101 kill -0 $PID &> /dev
/null
103 if [ $PID_EXISTS -eq 0 ]; then
104 echo $APP is running with pid
$PID ...
106 echo No
$APP process with pid
$PID, removing
$PID_FILE
127 echo $
"Usage: $0 {start|stop|status}"