File tree 3 files changed +15
-12
lines changed
3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -107,15 +107,9 @@ docker run -d --restart always \
107
107
-e " discovery.type=single-node" \
108
108
-i -t $nc_fts
109
109
110
+ # Wait for bootstraping
110
111
docker restart $fts_es_name
111
-
112
- echo " Waiting for docker bootstraping..."
113
- secs=$(( 20 ))
114
- while [ $secs -gt 0 ]; do
115
- echo -ne " $secs \033[0K\r"
116
- sleep 1
117
- : $(( secs-- ))
118
- done
112
+ countdown " Waiting for docker bootstraping..." " 20"
119
113
docker logs $fts_es_name
120
114
121
115
# Get Full Text Search app for nextcloud
Original file line number Diff line number Diff line change @@ -824,6 +824,17 @@ You will be given the option to abort when you hit OK."
824
824
fi
825
825
}
826
826
827
+ # countdown 'message looks like this' 10
828
+ countdown () {
829
+ echo " $1 "
830
+ secs=" $(( $2 )) "
831
+ while [ $secs -gt 0 ]; do
832
+ echo -ne " $secs \033[0K\r"
833
+ sleep 1
834
+ : $(( secs-- ))
835
+ done
836
+ }
837
+
827
838
# # bash colors
828
839
# Reset
829
840
Color_Off=' \e[0m' # Text Reset
Original file line number Diff line number Diff line change 173
173
rm -f " $STABLEVERSION .tar.bz2"
174
174
fi
175
175
176
- echo " Backing up files and upgrading to Nextcloud $NCVERSION in 10 seconds..."
177
- echo " Press CTRL+C to abort."
178
- sleep 10
176
+ countdown " Backing up files and upgrading to Nextcloud $NCVERSION in 10 seconds... Press CTRL+C to abort." " 10"
179
177
180
178
# Stop Apache2
181
179
check_command service apache2 stop
313
311
echo
314
312
printf " ${Green} All files are backed up.${Color_Off} \n"
315
313
occ_command maintenance:mode --on
316
- echo " Removing old Nextcloud instance in 5 seconds..." && sleep 5
314
+ countdown " Removing old Nextcloud instance in 5 seconds..." " 5 "
317
315
rm -rf $NCPATH
318
316
tar -xjf " $HTML /$STABLEVERSION .tar.bz2" -C " $HTML "
319
317
rm " $HTML /$STABLEVERSION .tar.bz2"
You can’t perform that action at this time.
0 commit comments