Skip to content

Commit

Permalink
Merge pull request #216 from Stefal/dev_2.3.4
Browse files Browse the repository at this point in the history
Dev 2.3.4
  • Loading branch information
Stefal authored Apr 1, 2022
2 parents f53f85f + 2e649ce commit fe595a9
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Changelog
## [2.3.4] - 2022-04-01
### Fixed
- Failure with some python dependancies. #215
- More fixes with Gpsd service restart. #94

## [2.3.3] - 2022-02-28
### Fixed
- Fix the Rinex conversion failure. #206
Expand Down
16 changes: 16 additions & 0 deletions rtkbase_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,22 @@ upd_2.3.2() {
sed -i '/^Restart=always.*/a RestartSec=30' /etc/systemd/system/gpsd.service
fi
systemctl daemon-reload
upd_2.3.3 "$@"
}

upd_2.3.3() {
#Overriding gpsd.service with custom dependency
cp /lib/systemd/system/gpsd.service /etc/systemd/system/gpsd.service
sed -i 's/^After=.*/After=str2str_tcp.service/' /etc/systemd/system/gpsd.service
sed -i '/^# Needed with chrony/d' /etc/systemd/system/gpsd.service
#Add restart condition
grep -qi '^Restart=' /etc/systemd/system/gpsd.service || sed -i '/^ExecStart=.*/a Restart=always' /etc/systemd/system/gpsd.service
grep -qi '^RestartSec=' /etc/systemd/system/gpsd.service || sed -i '/^Restart=always.*/a RestartSec=30' /etc/systemd/system/gpsd.service
#Add ExecStartPre condition to not start gpsd if str2str_tcp is not running. See https://github.com/systemd/systemd/issues/1312
grep -qi '^ExecStartPre=' /etc/systemd/system/gpsd.service || sed -i '/^ExecStart=.*/i ExecStartPre=systemctl is-active str2str_tcp.service' /etc/systemd/system/gpsd.service

systemctl daemon-reload
systemctl restart gpsd
}

# standard update
Expand Down
2 changes: 1 addition & 1 deletion settings.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[general]
# Version
version=2.3.3
version=2.3.4
# Rtkbase upgrade mandatory "checkpoint"
checkpoint_version=2.4.0
# User who runs str2str_file service
Expand Down
16 changes: 7 additions & 9 deletions tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,18 @@ install_gpsd_chrony() {
#Setting correct input for gpsd
sed -i 's/^DEVICES=.*/DEVICES="tcp:\/\/127.0.0.1:5015"/' /etc/default/gpsd
#Adding example for using pps
grep -q 'DEVICES="tcp:/120.0.0.1:5015 /dev/pps0' /etc/default/gpsd || sed -i '/^DEVICES=.*/a #DEVICES="tcp:\/\/127.0.0.1:5015 \/dev\/pps0"' /etc/default/gpsd
grep -qi 'DEVICES="tcp:/120.0.0.1:5015 /dev/pps0' /etc/default/gpsd || sed -i '/^DEVICES=.*/a #DEVICES="tcp:\/\/127.0.0.1:5015 \/dev\/pps0"' /etc/default/gpsd
#gpsd should always run, in read only mode
sed -i 's/^GPSD_OPTIONS=.*/GPSD_OPTIONS="-n -b"/' /etc/default/gpsd
#Overriding gpsd.service with custom dependency
cp /lib/systemd/system/gpsd.service /etc/systemd/system/gpsd.service
sed -i 's/^After=.*/After=str2str_tcp.service/' /etc/systemd/system/gpsd.service
if grep -qxF '^BindsTo=' /etc/systemd/system/gpsd.service
then
#Change the BindsTo value
sed -i 's/^BindsTo=.*/BindsTo=str2str_tcp.service/' /etc/systemd/system/gpsd.service
else
#Add the BindsTo value
sed -i '/^After=.*/i BindsTo=str2str_tcp.service' /etc/systemd/system/gpsd.service
fi
sed -i '/^# Needed with chrony/d' /etc/systemd/system/gpsd.service
#Add restart condition
grep -qi '^Restart=' /etc/systemd/system/gpsd.service || sed -i '/^ExecStart=.*/a Restart=always' /etc/systemd/system/gpsd.service
grep -qi '^RestartSec=' /etc/systemd/system/gpsd.service || sed -i '/^Restart=always.*/a RestartSec=30' /etc/systemd/system/gpsd.service
#Add ExecStartPre condition to not start gpsd if str2str_tcp is not running. See https://github.com/systemd/systemd/issues/1312
grep -qi '^ExecStartPre=' /etc/systemd/system/gpsd.service || sed -i '/^ExecStart=.*/i ExecStartPre=systemctl is-active str2str_tcp.service' /etc/systemd/system/gpsd.service

#Reload systemd services and enable chrony and gpsd
systemctl daemon-reload
Expand Down
2 changes: 2 additions & 0 deletions web_app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
jinja2==3.0.3
werkzeug==2.0.2
cryptography==3.3.2
itsdangerous==1.1.0
Flask==1.1.2
Expand Down

0 comments on commit fe595a9

Please sign in to comment.