Updated init
This commit is contained in:
parent
7650ace35d
commit
b50626d753
11
init
11
init
@ -5,7 +5,8 @@ NAME="SP"
|
||||
|
||||
function stop {
|
||||
echo "Stopping ${NAME}"
|
||||
echo "PLEASE connect with a client and issue HALT" && sleep 60
|
||||
kill $(pgrep dsmserv)
|
||||
echo "You should really connect with a client and issue HALT" && sleep 60
|
||||
}
|
||||
|
||||
trap 'stop' SIGTERM
|
||||
@ -18,6 +19,8 @@ if [ "$1" == "start" ]; then
|
||||
|
||||
[ -x /opt/tivoli/tsm/server/bin/dsmserv ] && su ${USER} -lc /opt/tivoli/tsm/server/bin/dsmserv &
|
||||
|
||||
# **NOTE**: ln /opt/tivoli/tsm/server/bin/dbbkapi/dsm.sys to /tsm/dbbkapi/dsm.sys, otherwise backups will fail
|
||||
ln -sf /tsm/dbbkapi/dsm.sys /opt/tivoli/tsm/server/bin/dbbkapi/dsm.sys
|
||||
wait
|
||||
|
||||
# Init one needs to copy some data from the install /tsm directory to our persistent storage volume - so that volume should be mounted under /tsm.init
|
||||
@ -41,9 +44,13 @@ elif [ "$1" == "upgrade" ]; then
|
||||
[ ! -f /tsm/.INIT -o ! -f /database/.INIT ] && echo "Please use -v <USER>:/tsm.init and <DATABASE>:/database.init and re-run upgrade" && exit 1
|
||||
/opt/tivoli/tsm/db2/instance/db2iupdt -d ${USER}
|
||||
|
||||
elif [ "$1" == "restore" ]; then
|
||||
elif [ "$1" == "restoredb" ]; then
|
||||
su ${USER} -lc "dsmserv restore db ${2:+password=$2} restorekeys=yes on=DBDIRS.TXT"
|
||||
|
||||
elif [ "$1" == "restore" ]; then
|
||||
echo "! Running [dsmserv $@]"
|
||||
su ${USER} -lc "dsmserv $@"
|
||||
|
||||
else
|
||||
exec $@
|
||||
fi
|
||||
|
Reference in New Issue
Block a user