Skip to content

Commit cf5c9b2

Browse files
committed
Backup of the speedtest binary
1 parent 3b4c5d0 commit cf5c9b2

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

install/pialert_update.sh

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ main() {
4747
download_pialert
4848
update_config
4949
update_db
50+
move_files_again
5051
update_permissions
5152
start_pialert
5253

@@ -119,13 +120,22 @@ create_backup() {
119120
}
120121

121122
# ------------------------------------------------------------------------------
122-
# Move files to the new directory
123+
# Move files to the temp directory
123124
# ------------------------------------------------------------------------------
124125
move_files() {
125-
if [ -e "$PIALERT_HOME/back/pialert.conf" ] ; then
126-
print_msg "- Moving pialert.conf to the new directory..."
127-
mkdir -p "$PIALERT_HOME/config"
128-
mv "$PIALERT_HOME/back/pialert.conf" "$PIALERT_HOME/config"
126+
if [ -e "$PIALERT_HOME/back/speedtest/speedtest" ] ; then
127+
echo "- Moving speedtest to temporary directory..."
128+
mv "$PIALERT_HOME/back/speedtest" "$PIALERT_HOME/config"
129+
fi
130+
}
131+
132+
# ------------------------------------------------------------------------------
133+
# Move files from the temp directory
134+
# ------------------------------------------------------------------------------
135+
move_files_again() {
136+
if [ -e "$PIALERT_HOME/config/speedtest/speedtest" ] ; then
137+
echo "- Moving speedtest from temporary directory..."
138+
mv "$PIALERT_HOME/config/speedtest" "$PIALERT_HOME/back"
129139
fi
130140
}
131141

0 commit comments

Comments
 (0)