22 lines
366 B
Plaintext
22 lines
366 B
Plaintext
|
#!/bin/bash
|
||
|
set -e
|
||
|
|
||
|
NAME="SP"
|
||
|
|
||
|
function stop {
|
||
|
echo "Stopping ${NAME}"
|
||
|
/opt/tivoli/tsm/ui/Liberty/bin/opscenter.rc stop
|
||
|
}
|
||
|
|
||
|
trap 'stop' SIGTERM
|
||
|
|
||
|
if [ "$1" == "start" ]; then
|
||
|
/opt/tivoli/tsm/ui/Liberty/bin/opscenter.rc start
|
||
|
|
||
|
( while ps -p $(cat /opt/tivoli/tsm/ui/Liberty/usr/servers/.pid/guiServer.pid) >/dev/null; do sleep 600; done ) &
|
||
|
|
||
|
wait
|
||
|
else
|
||
|
exec $@
|
||
|
fi
|