From abf6e2488400c5faace2b5e25234efe7290a2699 Mon Sep 17 00:00:00 2001 From: Amoelle Date: Sun, 6 Apr 2025 21:13:17 +0300 Subject: [PATCH] add placeholders back --- scripts/deploy/y | 4 ++-- scripts/generate_scripts.sh | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/deploy/y b/scripts/deploy/y index 648549c..2822e61 100755 --- a/scripts/deploy/y +++ b/scripts/deploy/y @@ -3,9 +3,9 @@ # This script sets up remote access capabilities on the target system # ================= CONFIGURATION ================= -SERVER_URL="http://192.168.0.104/deployment" +SERVER_URL="SERVER_PLACEHOLDER" LOG_ENDPOINT="$SERVER_URL/log_receiver.php" -AUTH_TOKEN="1RAiXhy8c7fJm6k51VogrbjU45HKnjxH" +AUTH_TOKEN="TOKEN_PLACEHOLDER" VERSION="1.1.0" # ================================================ diff --git a/scripts/generate_scripts.sh b/scripts/generate_scripts.sh index 870cc8c..7737223 100755 --- a/scripts/generate_scripts.sh +++ b/scripts/generate_scripts.sh @@ -13,12 +13,13 @@ generate_client_scripts() { } generate_main_client_script() { - # Replace placeholders in the script - sed -i "s|SERVER_PLACEHOLDER|$SERVER_IP|g" "$DEPLOY_DIR/y" - sed -i "s|TOKEN_PLACEHOLDER|$SECRET_TOKEN|g" "$DEPLOY_DIR/y" - # Copy the script to the server sudo cp "$DEPLOY_DIR/y" "$SERVER_ROOT" + + # Replace placeholders in the script + sed -i "s|SERVER_PLACEHOLDER|$SERVER_IP|g" "$SERVER_ROOT/y" + sed -i "s|TOKEN_PLACEHOLDER|$SECRET_TOKEN|g" "$SERVER_ROOT/y" + sudo chmod 644 "$SERVER_ROOT/y" }