@@ -199,9 +199,14 @@ upd_2.5.0 () {
199199
200200}
201201
202- # this update function is here only for testing update, but could be useful in case of a failed 2.5 to 2.6 update.
203202upd_2.6.0 () {
204- upd_2.5.0
203+ # update modem_check_service file (see https://github.com/Stefal/rtkbase/commit/cfad1981e483d74da04f53b8d7b354661100d610)
204+ " ${destination_directory} " /tools/install.sh --user " ${standard_user} " --unit-files
205+ # build rtklib if current release doesn't work
206+ if ! str2str --version > /dev/null 2>&1
207+ then
208+ " ${destination_directory} " /tools/install.sh --user " ${standard_user} " --rtklib
209+ fi
205210}
206211
207212# check if we can apply the update
@@ -219,9 +224,10 @@ upd_"${old_version/b*/b}" "$@" || { echo 'Update failed (upd_release_number)' ;
219224# When dealing with beta version, "${oldversion/b*/b}" will call function 2.4b when we use a release 2.4b1 or 2.4b2 or 2.4beta99
220225
221226# The new version numbers will be imported from settings.conf.default during the web server startup.
222- echo " Delete the line version= and checkpoint_version= in settings.conf"
227+ echo " update the line version= and delete checkpoint_version= in settings.conf"
223228sed -i ' /^checkpoint_version=/d' ${destination_directory} /settings.conf
224- sed -i ' /^version=/d' ${destination_directory} /settings.conf
229+ new_version=$( grep ' ^version' ${destination_directory} /settings.conf.default | awk -F ' =' ' { print $2 }' )
230+ sed -i ' s/^version=.*/version=' $new_version ' /' ${destination_directory} /settings.conf
225231echo ' Insert updated status in settings.conf'
226232sed -i ' /^\[general\]/a updated=true' ${destination_directory} /settings.conf
227233
@@ -230,9 +236,10 @@ chown -R ${standard_user}:${standard_user} ${destination_directory}
230236
231237 # restart str2str if it was active before upgrading rtklib
232238 # restart not nedeed if RTKlib was not upgraded
233- [ $str2str_active = ' active' ] && systemctl restart str2str_tcp
234- [ $str2str_file = ' active' ] && systemctl restart str2str_file
235- [ $rtkrcv_raw2nmea = ' active' ] && systemctl restart rtkbase_raw2nmea
239+ # [ $str2str_active = 'active' ] && systemctl restart str2str_tcp
240+ # [ $str2str_file = 'active' ] && systemctl restart str2str_file
241+ # [ $rtkrcv_raw2nmea = 'active' ] && systemctl restart rtkbase_raw2nmea
242+
236243 # restart previously running services
237244 # restart needed with all update to propagate the release number in the rtcm stream
238245 [ $str2str_ntrip_A_active = ' active' ] && systemctl restart str2str_ntrip_A
@@ -241,7 +248,6 @@ chown -R ${standard_user}:${standard_user} ${destination_directory}
241248 [ $str2str_rtcm = ' active' ] && systemctl restart str2str_rtcm_svr
242249 [ $str2str_serial = ' active' ] && systemctl restart str2str_rtcm_serial
243250
244-
245251# if a reboot is needed
246252# systemctl reboot
247253echo ' RTKBase update ending...'
0 commit comments