1
0

add: dkpg support environment parameter to do DB install/upgrade

This commit is contained in:
2024-09-03 16:12:18 +08:00
parent 7831377857
commit 860b53b06a
2 changed files with 34 additions and 0 deletions

View File

@@ -147,6 +147,23 @@ systemctl enable captrace.service
#systemctl enable kvdb.service
systemctl daemon-reload
#systemctl stop nginx.service
# read environment parameter and to do
if [ "$M_PARAM" == "install" -o "$M_PARAM" == "upgrade" ]; then
echo "M parameter: $M_PARAM"
if [ -n "$C_PARAM" ]; then
echo "C parameter: $C_PARAM"
${OMCRootDir}/bin/setomc.sh -m $M_PARAM -c $C_PARAM
else
${OMCRootDir}/bin/setomc.sh -m $M_PARAM
fi
# exit while failed to run setomc.sh
if [ $? -ne 0 ]; then
echo "setomc.sh execution failed. Exiting."
exit 1
fi
fi
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service

View File

@@ -147,6 +147,23 @@ systemctl enable captrace.service
#systemctl enable kvdb.service
systemctl daemon-reload
#systemctl stop nginx.service
# read environment parameter and to do
if [ "$M_PARAM" == "install" -o "$M_PARAM" == "upgrade" ]; then
echo "M parameter: $M_PARAM"
if [ -n "$C_PARAM" ]; then
echo "C parameter: $C_PARAM"
${OMCRootDir}/bin/setomc.sh -m $M_PARAM -c $C_PARAM
else
${OMCRootDir}/bin/setomc.sh -m $M_PARAM
fi
# exit while failed to run setomc.sh
if [ $? -ne 0 ]; then
echo "setomc.sh execution failed. Exiting."
exit 1
fi
fi
systemctl stop restagent.service
systemctl stop crontask.service
systemctl stop sshsvc.service