Update build.sh
This commit is contained in:
parent
723d14c951
commit
a39de5abc7
23
build.sh
23
build.sh
|
@ -1,22 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Define the URL for downloading the simple-jaeger.php file
|
# Build the Docker image
|
||||||
PLUGIN_URL="https://git.nixc.us/colin/SimpleJaeger/raw/branch/main/simple-jaeger.php"
|
docker build -t simple-jaeger .
|
||||||
|
|
||||||
# Define the target directory
|
# Run the Docker container
|
||||||
TARGET_DIR="wp-content/plugins/simple-jaeger"
|
docker run -d -p 8080:80 --name simple-jaeger simple-jaeger
|
||||||
|
|
||||||
# Create the target directory if it doesn't exist
|
|
||||||
mkdir -p $TARGET_DIR
|
|
||||||
|
|
||||||
# Download the simple-jaeger.php file into the target directory
|
|
||||||
curl -o $TARGET_DIR/simple-jaeger.php $PLUGIN_URL
|
|
||||||
|
|
||||||
# Create a blank tracking-code.php file if it doesn't already exist
|
|
||||||
touch $TARGET_DIR/tracking-code.php
|
|
||||||
|
|
||||||
# Set the correct permissions for the files
|
|
||||||
chmod 644 $TARGET_DIR/simple-jaeger.php
|
|
||||||
chmod 644 $TARGET_DIR/tracking-code.php
|
|
||||||
|
|
||||||
echo "SimpleJaeger plugin has been installed or updated successfully."
|
|
||||||
|
|
Loading…
Reference in New Issue