-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathinformix_stop.sh
33 lines (26 loc) · 880 Bytes
/
informix_stop.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
#
# name: informix_start.sh:
# description: Stops Informix in Docker container
# url: https://github.com/0x1fff/docker-informix
#
set -o pipefail
function myfatal {
if [ "${1}" -ne 0 ] ; then
echo "${2}" >&2
exit $1
fi
}
export INFORMIX_HOME="/home/informix/"
INFORMIX_HOME="${INFORMIX_HOME%/}" # Strip the trailing / (if exists)
export INFORMIX_DATA_DIR="${INFORMIX_HOME}/data/"
INFORMIX_DATA_DIR="${INFORMIX_DATA_DIR%/}"
source "${INFORMIX_HOME}/.bashrc"
source "${INFORMIX_HOME}/ifx_dev.env"
echo ">>> Stopping the IBM Informix Database (${INFORMIXSERVER}) ... "
onmode -kuy
## -k Shutdown completely
## -u Change to quiescent mode and kill all attached sessions
## -y Do not require confirmation
myfatal $? "*** Shutdown of ${INFORMIXSERVER} FAILED***"
echo "*** Shutdown of ${INFORMIXSERVER} SUCCESS ***"