![JAR search and dependency download from the Maven repository](/logo.png)
no.tsl2.nano.h5.2.5.1.source-code.runasservice.sh Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tsl2.nano.h5 Show documentation
Show all versions of tsl2.nano.h5 Show documentation
TSL2 Framework Html5 Extensions (WebServer, Html5Presentation, RuleCover, BeanConfigurator, LogicTable-Sheet, Expression-Descriptors for Actions, Rules, URLs, Queries)
#!/bin/bash
# start script for tsl2nano as service
APPNAME=environment
PORT=8067
APPDIR=.nanoh5.$APPNAME
if [ "$1" == "--help" ]
then
echo "usage: $0 [stop | backup | --help]"
echo " if no parameter was given, this application starts"
echo " with environment $APPDIR"
echo ""
echo " stop : stops the process $APPNAME, if running already"
echo " backup: creatings a compressed tar backup file"
echo " --help: prints the help screen and exits"
exit 0
fi
if [ "$1" == "backup" ]
then
ARCHIVE_NAME=backup-${PWD##*/}-$(date -d "today" +"%Y%m%d%H%M").tar.gz
echo "creating backup $ARCHIVE_NAME ..."
tar -czf $ARCHIVE_NAME *.sh $APPDIR .nanoh5.* --exclude=*.*ar --exclude=*.zip --exclude=temp --exclude=*.log --exclude=*.lck --exclude=target --exclude=dist
exit 0
fi
if [ "$1" == "stop" ]
then
APPID=$(ps -C java -o pid= -o command= | grep $APPNAME | grep -o -E "^[0-9]+" | line)
if [ "$APPID" == "" ]
then
echo "$APPNAME is not running yet..."
exit 1
fi
kill -9 $APPID
echo "$APPNAME stopped successfully"
exit 0
fi
nohup ./run.sh $APPDIR $PORT &Z
# < /dev/null & tail -F $APPDIR/logfactory.log
© 2015 - 2025 Weber Informatics LLC | Privacy Policy