ldmadmin alias to edex_ldm service for root

This commit is contained in:
Michael James 2016-09-15 13:58:22 -05:00
parent 14c8aca2bb
commit 79b09c17ab
3 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,6 @@
#!/bin/csh
if ( ${USER} == "root" ) then
alias ldmadmin service edex_ldm
exit 1
endif
alias cave /awips2/cave/run.sh -alertviz -component thinclient

View file

@ -1,6 +1,7 @@
#!/bin/bash
PATH=/awips2/tools/bin:$PATH
if [[ ${USER} = "root" ]]; then
alias ldmadmin='service edex_ldm'
return
fi
alias cave='/awips2/cave/run.sh -alertviz -component thinclient'

View file

@ -42,15 +42,16 @@ case $1 in
'start')
if ! clean_ldm; then exit 1 ; fi
echo -n "Starting AWIPS II LDM:"
su ${LDM_USER} -lc "ldmadmin start"
;;
'stop')
echo -n "Stopping AWIPS II LDM:"
su ${LDM_USER} -lc "ldmadmin stop"
;;
'restart')
su ${LDM_USER} -lc "ldmadmin restart"
;;
*)
echo "usage: $0 {start|stop|restart}"
RETVAL=1