fix(monitor): Resolve sed delimiter issue in monitor.hook.sh
Updated the sed commands in monitor.hook.sh to use # as a delimiter instead of / when updating SAPCONTROL_PATH and HDBSQL_PATH. This resolves "unknown option to s" errors caused by path slashes conflicting with the sed syntax.
This commit is contained in:
@@ -37,8 +37,8 @@ HDBSQL_PATH_INPUT=${HDBSQL_PATH_INPUT:-"/usr/sap/hdbclient/hdbsql"}
|
|||||||
# Update monitor.conf
|
# Update monitor.conf
|
||||||
sed -i "s/^COMPANY_NAME=\".*\"/COMPANY_NAME=\"$COMPANY_NAME_INPUT\"/" monitor.conf
|
sed -i "s/^COMPANY_NAME=\".*\"/COMPANY_NAME=\"$COMPANY_NAME_INPUT\"/" monitor.conf
|
||||||
sed -i "s/^NTFY_TOKEN=\".*\"/NTFY_TOKEN=\"$NTFY_TOKEN_INPUT\"/" monitor.conf
|
sed -i "s/^NTFY_TOKEN=\".*\"/NTFY_TOKEN=\"$NTFY_TOKEN_INPUT\"/" monitor.conf
|
||||||
sed -i "s/^SAPCONTROL_PATH=\".*\"/SAPCONTROL_PATH=\"$SAPCONTROL_PATH_INPUT\"/" monitor.conf
|
sed -i "s#^SAPCONTROL_PATH=\".*\"#SAPCONTROL_PATH=\"$SAPCONTROL_PATH_INPUT\"#" monitor.conf
|
||||||
sed -i "s/^HDBSQL_PATH=\".*\"/HDBSQL_PATH=\"$HDBSQL_PATH_INPUT\"/" monitor.conf
|
sed -i "s#^HDBSQL_PATH=\".*\"#HDBSQL_PATH=\"$HDBSQL_PATH_INPUT\"#" monitor.conf
|
||||||
sed -i "s/^HANA_USER_KEY=\".*\"/HANA_USER_KEY=\"$HANA_USER_KEY_INPUT\"/" monitor.conf
|
sed -i "s/^HANA_USER_KEY=\".*\"/HANA_USER_KEY=\"$HANA_USER_KEY_INPUT\"/" monitor.conf
|
||||||
|
|
||||||
echo "monitor.conf updated successfully!"
|
echo "monitor.conf updated successfully!"
|
||||||
Reference in New Issue
Block a user