From d5679b68f4e8234fc44cac2eda0935dd16a0fa68 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Mon, 20 Jan 2025 16:52:17 +0200 Subject: [PATCH] Update update1011.sh --- docs/update1011.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/update1011.sh b/docs/update1011.sh index 0316198..3409100 100644 --- a/docs/update1011.sh +++ b/docs/update1011.sh @@ -158,6 +158,18 @@ else exit 1 fi +# Path to the .env file +ENV_FILE="/var/www/cp/.env" + +# Check if the line already exists +if ! grep -q "NICKY_API_KEY=" "$ENV_FILE"; then + # Insert the new line after NOW_API_KEY + sed -i "/^NOW_API_KEY=/a NICKY_API_KEY='nicky-api-key'" "$ENV_FILE" + echo "NICKY_API_KEY added to the .env file." +else + echo "NICKY_API_KEY already exists in the .env file." +fi + # Start services echo "Starting services..." systemctl start epp