DATA_DIR=$EXEC_DIR/data
CONF_RW=$EXEC_DIR/state
CONFIG_INI=$CONF_RW/config.ini
-LOG_DIR=/var/log/$APP
-LOG_FILE=$LOG_DIR/$APP.log
-
-RUN_DIR=/var/run/$APP
-PID_FILE=$RUN_DIR/$APP.pid
OSGI_INSTALL_AREA=/usr/share/osgi/boot
OSGI_FRAMEWORK=$OSGI_INSTALL_AREA/org.eclipse.osgi.jar
start() {
mkdir -p $CONF_RW
mkdir -p $DATA_DIR
- chown -R $APP.APP $EXEC_DIR
- # Merge config files
- echo ## Equinox configuration - Generated by /usr/sbin/nodectl > $CONFIG_INI
- cat $BASE_CONFIG_INI >> $CONFIG_INI
- cat $CONF_DIR/$APP.ini >> $CONFIG_INI
- for file in `ls -v $CONF_DIRS/*.ini`; do
- echo "\n# $file\n" >> $CONFIG_INI;
- cat $file >> $CONFIG_INI
- done;
+ # Merge config files
+ printf "## Equinox configuration - Generated by /usr/sbin/nodectl ##\n\n" > $CONFIG_INI
+ cat $BASE_CONFIG_INI >> $CONFIG_INI
+ printf "\n##\n## $CONF_DIR/$APP.ini\n##\n\n" >> $CONFIG_INI
+ cat $CONF_DIR/$APP.ini >> $CONFIG_INI
+ for file in `ls -v $CONF_DIRS/*.ini`; do
+ printf "\n##\n## $file\n##\n\n" >> $CONFIG_INI
+ cat $file >> $CONFIG_INI
+ done;
cd $EXEC_DIR
$JVM \
# remove pid file
rm -f $PID_FILE
return $RETVAL
-
-# timeout is only available in EL6
-# timeout 5m sh << EOF
-#while kill -0 $PID &> /dev/null; do sleep 1; done
-#EOF
-# TIMEOUT_EXIT=$?
-# if [ $TIMEOUT_EXIT -eq 124 ];then
-# kill -9 $PID
-# RETVAL=1
-# echo Killed $APP with pid $PID
-# else
-# echo Stopped $APP with pid $PID
-# fi
-# rm -f $PID_FILE
-# return $RETVAL
}
status() {