File tree Expand file tree Collapse file tree 1 file changed +4
-21
lines changed
Expand file tree Collapse file tree 1 file changed +4
-21
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ function updatecheck()
6565function update()
6666{
6767
68- printf " update"
68+ echo " update"
6969
7070 # Stop the bot and wait 15 seconds to ensure shutdown
7171 sudo /bin/systemctl stop phantombot
@@ -74,31 +74,26 @@ function update()
7474 # Download
7575 wget -q $dLink
7676
77- delay
78-
7977 backup
8078
8179 # Unzip
8280 unzip -q $archive
83- delay
8481
8582 # Move to standard bot folder
8683 mv $scriptPath /${archive::- 4} $botPath
87- delay
8884
8985 # Import Database
9086 cp -R $scriptPath /bot-backup/config/ $botPath
9187 cp -R $scriptPath /bot-backup/scripts/lang/custom $botPath /scripts/lang
9288
93- delay
94- delay
95-
9689 # Change Ownership
9790 chmod u+x $botPath /launch.sh $botPath /launch-service.sh $botPath /java-runtime-linux/bin/java
9891
9992 # Delete the downloaded archive
10093 rm ./$archive
101- delay
94+
95+ # Update the version number
96+ printf $version > $botPath /version.id
10297
10398 # Restart the bot
10499 sudo /bin/systemctl start phantombot
@@ -117,15 +112,6 @@ function backup()
117112
118113}
119114
120- # Define a fixed delay duration
121-
122- function delay()
123- {
124-
125- sleep 0.2;
126-
127- }
128-
129115# Write to update logfile
130116
131117function log()
@@ -153,9 +139,6 @@ printf "%s\n" >> $logfile
153139# Start the update routine
154140updatecheck
155141
156- # Update the version number
157- printf $version > $botPath /version.id
158-
159142# Log to file
160143log
161144
You can’t perform that action at this time.
0 commit comments