Skip to content

Commit

Permalink
move scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ipitio committed Jan 31, 2024
1 parent c1b0c0b commit 9f31259
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
15 changes: 8 additions & 7 deletions mod.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9f31259

Please sign in to comment.