From 9f312592d31b963331d650215f958a155860b9a2 Mon Sep 17 00:00:00 2001 From: ipitio <21136719+ipitio@users.noreply.github.com> Date: Wed, 31 Jan 2024 05:49:27 -0500 Subject: [PATCH] move scripts --- README.md | 6 +++--- mod.sh | 15 ++++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5f1afd8..35c2b60 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ The provided script by @ipitio can un/re/install and update the mod, and manage Install (or reinstall) the latest version of the Mod and only the Mod. ```bash -curl -sSLN https://github.com/arevindh/AdminLTE/raw/master/scripts/pi-hole/speedtest/mod.sh | sudo bash +curl -sSLN https://github.com/arevindh/pi-hole/raw/master/advanced/Scripts/speedtestmod/mod.sh | sudo bash ``` [Manual Instructions](https://github.com/arevindh/pihole-speedtest/wiki/Installing-Speedtest-Mod) @@ -57,7 +57,7 @@ curl -sSLN https://github.com/arevindh/AdminLTE/raw/master/scripts/pi-hole/speed The above, but also runs Pi-hole's update. This is `(Re)install Latest` in the web interface. ```bash -curl -sSLN https://github.com/arevindh/AdminLTE/raw/master/scripts/pi-hole/speedtest/mod.sh | sudo bash -s up +curl -sSLN https://github.com/arevindh/pi-hole/raw/master/advanced/Scripts/speedtestmod/mod.sh | sudo bash -s up ``` [Manual Instructions](https://github.com/arevindh/pihole-speedtest/wiki/Updating--Speedtest-Mod) @@ -67,7 +67,7 @@ curl -sSLN https://github.com/arevindh/AdminLTE/raw/master/scripts/pi-hole/speed The Mod and only the Mod will be removed. Its history will be preserved. ```bash -curl -sSLN https://github.com/arevindh/AdminLTE/raw/master/scripts/pi-hole/speedtest/mod.sh | sudo bash -s un +curl -sSLN https://github.com/arevindh/pi-hole/raw/master/advanced/Scripts/speedtestmod/mod.sh | sudo bash -s un ``` [Manual Instructions](https://github.com/arevindh/pihole-speedtest/wiki/Uninstalling-Speedtest-Mod) diff --git a/mod.sh b/mod.sh index c5bb9cb..63159cd 100644 --- a/mod.sh +++ b/mod.sh @@ -171,13 +171,14 @@ install() { download /var/www/html admin https://github.com/arevindh/AdminLTE web if [ -f $curr_wp ]; then if ! cat $curr_wp | grep -q SpeedTest; then - cp $curr_wp $org_wp + cp -a $curr_wp $org_wp fi if [ ! -f $last_wp ]; then - cp $curr_wp $last_wp + cp -a $curr_wp $last_wp fi fi - cp /opt/mod_pihole/advanced/Scripts/webpage.sh $curr_wp + cp -a /opt/mod_pihole/advanced/Scripts/webpage.sh $curr_wp + cp -a /opt/mod_pihole/advanced/Scripts/speedtestmod /opt/pihole/speedtestmod chmod +x $curr_wp manageHistory db . pihole -a -s @@ -193,16 +194,16 @@ uninstall() { download /opt org_pihole https://github.com/pi-hole/pi-hole Pi-hole fi cd /opt - cp org_pihole/advanced/Scripts/webpage.sh $org_wp + cp -a org_pihole/advanced/Scripts/webpage.sh $org_wp rm -rf org_pihole fi pihole -a -su download /var/www/html admin https://github.com/pi-hole/AdminLTE web if [ ! -f $last_wp ]; then - cp $curr_wp $last_wp + cp -a $curr_wp $last_wp fi - cp $org_wp $curr_wp + cp -a $org_wp $curr_wp chmod +x $curr_wp fi @@ -239,7 +240,7 @@ abort() { echo "Process Aborting..." if [ -f $last_wp ]; then - cp $last_wp $curr_wp + cp -a $last_wp $curr_wp chmod +x $curr_wp rm -f $last_wp fi