Add command to start/stop server
This commit is contained in:
parent
a46eb7b5c5
commit
010d20be83
2
Makefile
2
Makefile
|
@ -1,3 +1,3 @@
|
||||||
fns=diralias j jmod lr
|
fns=diralias j jmod lr tcat
|
||||||
install:
|
install:
|
||||||
install ${fns} $${FPATH:?FPATH not defined}
|
install ${fns} $${FPATH:?FPATH not defined}
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
Loading…
Reference in New Issue