From 228226fce86e169cbe9e9e27527b59d5b7bbf8b1 Mon Sep 17 00:00:00 2001 From: colin Date: Mon, 1 Jul 2024 18:08:38 +0000 Subject: [PATCH] Update install.sh --- install.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index 0ce2951..c55800f 100644 --- a/install.sh +++ b/install.sh @@ -1,26 +1,29 @@ #!/bin/bash # Define plugin details -PLUGIN_URL="https://git.nixc.us/colin/SimpleTracking/raw/branch/main/simple-tracking.php" -PLUGIN_DIR="./wp-content/plugins/simple-tracking" +PLUGIN_URL="https://git.nixc.us/colin/SimpleOtel/raw/branch/main/simple-otel.php" +PLUGIN_DIR="./wp-content/plugins/simple-otel" # Create plugin directory if it doesn't exist mkdir -p "$PLUGIN_DIR" # Download the plugin file -curl -o "$PLUGIN_DIR/simple-tracking.php" "$PLUGIN_URL" +curl -o "$PLUGIN_DIR/simple-otel.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." +# Create a blank config.php file if it doesn't exist +if [ ! -f "$PLUGIN_DIR/config.php" ]; then + touch "$PLUGIN_DIR/config.php" + echo " "$PLUGIN_DIR/config.php" + echo "// Configuration for Simple Otel plugin" >> "$PLUGIN_DIR/config.php" + echo "// Add your configurations here" >> "$PLUGIN_DIR/config.php" + echo "Configuration file created at wp-content/plugins/simple-otel/config.php." else - echo "tracking-code.php already exists." + echo "config.php already exists." fi # Set correct permissions -chmod 644 "$PLUGIN_DIR/simple-tracking.php" -chmod 644 "$PLUGIN_DIR/tracking-code.php" +chmod 644 "$PLUGIN_DIR/simple-otel.php" +chmod 644 "$PLUGIN_DIR/config.php" # Inform user -echo "Simple Tracking plugin installed/updated successfully." +echo "Simple Otel plugin installed/updated successfully."