Skip to content

Commit

Permalink
Default configuration update
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaczorek committed Sep 13, 2024
1 parent 10e500c commit 3f1a5aa
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ OR

Setup system-wide service:
```
sudo cp virtualgps.py /usr/bin/
sudo cp virtualgps.py /usr/local/bin/
sudo cp virtualgps.service /etc/systemd/system/
sudo systemctl enable virtualgps.service
sudo systemctl start virtualgps.service
Expand Down
5 changes: 5 additions & 0 deletions virtualgps.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Example location set to Warsaw, Poland
[warsaw]
latitude = 52.13791
longitude = 21.00704
elevation = 100.0
2 changes: 1 addition & 1 deletion virtualgps.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def term_handler(signum, frame):
f.close()
continue

now = datetime.datetime.utcnow()
now = datetime.datetime.now(datetime.UTC)
date_now = now.strftime("%d%m%y")
time_now = now.strftime("%H%M%S")

Expand Down
2 changes: 1 addition & 1 deletion virtualgps.service
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ After=multi-user.target gpsd.socket
[Service]
Type=idle
User=root
ExecStart=/usr/bin/python3 /usr/bin/virtualgps.py
ExecStart=/usr/bin/python3 /usr/bin/local/virtualgps.py
ExecStartPost=sleep 3
ExecStartPost=+/usr/sbin/gpsdctl add /tmp/vgps
ExecStopPost=+/usr/sbin/gpsdctl remove /tmp/vgps
Expand Down

0 comments on commit 3f1a5aa

Please sign in to comment.