Update setup_service.sh

This commit is contained in:
Saifeddine ALOUI
2025-06-25 11:36:01 +02:00
committed by GitHub
parent d46415c98e
commit 8bda441976

View File

@@ -220,7 +220,7 @@ case $COMMAND in
CONFIG_FILE="/etc/ops/config.ini"
# Edit the server parameter in the config file
sudo sed -i "/\[$SERVER_NAME\]/,/^\[.*\]/ s/^\($PARAMETER\s*=\s*\).*\$/\\1$VALUE/" $CONFIG_FILE
sudo sed -i "/^\[$SERVER_NAME\]/,/^\[.*\]/ s/^\([^[]\+\)/ \1/" "$CONFIG_FILE" | grep -A 50 "^\s*$SERVER_NAME" | head -n 3
echo "Parameter '$PARAMETER' for server '$SERVER_NAME' updated to '$VALUE'."
;;