From b469022d6e243a7859ee547a023c4b7d09fbcc3b Mon Sep 17 00:00:00 2001 From: colin Date: Sat, 29 Jun 2024 23:35:44 +0000 Subject: [PATCH] Update install.sh --- install.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index 61258f4..0ce2951 100644 --- a/install.sh +++ b/install.sh @@ -1,17 +1,26 @@ #!/bin/bash -# Define plugin URL and target directory -PLUGIN_URL="https://git.nixc.us/colin/SimpleStatus/raw/branch/main/simple-status.php" -PLUGIN_DIR="./wp-content/plugins/simple-status" +# Define plugin details +PLUGIN_URL="https://git.nixc.us/colin/SimpleTracking/raw/branch/main/simple-tracking.php" +PLUGIN_DIR="./wp-content/plugins/simple-tracking" # Create plugin directory if it doesn't exist mkdir -p "$PLUGIN_DIR" -# Download the plugin -curl -o "$PLUGIN_DIR/simple-status.php" "$PLUGIN_URL" +# Download the plugin file +curl -o "$PLUGIN_DIR/simple-tracking.php" "$PLUGIN_URL" + +# Create a blank tracking-code.php file if it doesn't exist +if [ ! -f "$PLUGIN_DIR/tracking-code.php" ]; then + touch "$PLUGIN_DIR/tracking-code.php" + echo "Please add your tracking code to wp-content/plugins/simple-tracking/tracking-code.php." +else + echo "tracking-code.php already exists." +fi # Set correct permissions -chmod 644 "$PLUGIN_DIR/simple-status.php" +chmod 644 "$PLUGIN_DIR/simple-tracking.php" +chmod 644 "$PLUGIN_DIR/tracking-code.php" # Inform user -echo "Simple Status plugin installed/updated successfully." +echo "Simple Tracking plugin installed/updated successfully."