@@ -199,9 +199,14 @@ upd_2.5.0 () {
199
199
200
200
}
201
201
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.
203
202
upd_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
205
210
}
206
211
207
212
# check if we can apply the update
@@ -219,9 +224,10 @@ upd_"${old_version/b*/b}" "$@" || { echo 'Update failed (upd_release_number)' ;
219
224
# 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
220
225
221
226
# 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"
223
228
sed -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
225
231
echo ' Insert updated status in settings.conf'
226
232
sed -i ' /^\[general\]/a updated=true' ${destination_directory} /settings.conf
227
233
@@ -230,9 +236,10 @@ chown -R ${standard_user}:${standard_user} ${destination_directory}
230
236
231
237
# restart str2str if it was active before upgrading rtklib
232
238
# 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
+
236
243
# restart previously running services
237
244
# restart needed with all update to propagate the release number in the rtcm stream
238
245
[ $str2str_ntrip_A_active = ' active' ] && systemctl restart str2str_ntrip_A
@@ -241,7 +248,6 @@ chown -R ${standard_user}:${standard_user} ${destination_directory}
241
248
[ $str2str_rtcm = ' active' ] && systemctl restart str2str_rtcm_svr
242
249
[ $str2str_serial = ' active' ] && systemctl restart str2str_rtcm_serial
243
250
244
-
245
251
# if a reboot is needed
246
252
# systemctl reboot
247
253
echo ' RTKBase update ending...'
0 commit comments