Update update1011.sh

This commit is contained in:
Pinga 2025-01-20 16:52:17 +02:00
parent 7818d01d37
commit d5679b68f4

View file

@ -158,6 +158,18 @@ else
exit 1 exit 1
fi 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 # Start services
echo "Starting services..." echo "Starting services..."
systemctl start epp systemctl start epp