
no.tsl2.nano.h5.2.5.6.source-code.restart-all.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)
The newest version!
echo ======================================================
echo RESTARTING ALL TSL2NANO APPLICATIONS
echo Thomas Schneider / 08.2018
echo ======================================================
###########################################################
# All NanoH5 Apps must be inside an own sub-directory
# having the executable script 'runasservice.sh'
###########################################################
# activate this block and de-activate that in your projects run.sh to admin the program-version centralized
export NAME=${project.artifactId}
export VERSION=${project.version}
#export EXTENSION="-standalone"
[[ "$1" == "localhost" ]] && export MYIP="localhost" && shift
export MYIP=${MYIP:-"$(ip -o route get to 8.8.8.8 | sed -n 's/.*src \([0-9.]\+\).*/\1/p')"}
export OFFLINE="-Dtsl2nano.offline=true"
#export RESTART_ALL='-Dapp.login.secure=false -Dapp.login.administration=true -Dapp.login.jarfile.fileselector=false'
export TSL2_PROJECTS=${TSL2_PROJECTS:-$(ls -d */)}
if [[ $1 == "help" ]]; then
echo "usage:=========================================================================="
echo "clean : removes all backup files (tar.gz and .sik) generated with this script"
echo "stop : doesn't restart but stops all services, started by this script"
echo "help : prints this help"
echo "================================================================================"
exit 0
fi
if [[ $1 == "clean" ]]; then
echo "cleaning all tsl2nano backup files..."
rm tsl2nano-all-services.tar.gz
find . -type f -name '*.tar.gz' -or -name '*.sik' -exec rm -I {} +
fi
#echo "refreshing backup 'tsl2nano-all-services.tar.gz'..."
tar -uf --exclude *.gz --exclude=*.*ar --exclude *.log --exclude *.sik --exclude *.lck --exclude *.out --exclude target --exclude dist tsl2nano-all-services.tar.gz .
echo -e "RESTARTING TSL2_PROJECTS: \n$TSL2_PROJECTS\n"
echo "with MYIP:$MYIP"
html_body=$(cat <
TSL2 Applications
TSL2 Applications
" >> app-index.html
echo "" >> app-index.html
echo
echo ------------------------------------------------------
echo PROCESSES:
echo ------------------------------------------------------
ps -ef | grep java
if [[ $1 != "stop" ]]; then
echo
echo "PORTS:" $(ps -ef | grep java | grep -o -E "(80|90)[0-9]{2}" | sort | tr '\n' ' ')
echo ======================================================
echo RESTART SUCCESSFULL
echo ======================================================
xdg-open app-index.html
read -p "start tail for all processes? [Y|n]: " dotail
fi
if [[ "$dotail" != "n" ]]; then
# for d in $(ls -d */)
# do
# if [[ -f $d"nohup.out" ]]; then
# TAILFILES=$TAILFILES $d"nohup.out"
# fi
# done
# tail -F $TAILFILES
tail -F `find . -name *.out`
fi
© 2015 - 2025 Weber Informatics LLC | Privacy Policy