Add command to start/stop server

This commit is contained in:
Adolfo Perez Alvarez 2022-10-04 16:12:23 +02:00
parent a46eb7b5c5
commit 010d20be83
2 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,3 @@
fns=diralias j jmod lr
fns=diralias j jmod lr tcat
install:
install ${fns} $${FPATH:?FPATH not defined}

20
tcat Normal file
View File

@ -0,0 +1,20 @@
function tcat
{
(( $# != 1 )) && return 64
case $1 in
log)
(jr && less ../bundles/tomcat-*/logs/catalina.out)
;;
start)
pgrep -f tomcat && return 1
(jr && ../bundles/tomcat-*/bin/catalina.sh jpda start) >/dev/null
;;
stop)
pgrep -f tomcat || return 1
(jr && ../bundles/tomcat-*/bin/shutdown.sh) >/dev/null
;;
*)
return 64
;;
esac
}