Skip to content

Commit bdd20eb

Browse files
committed
Try to fix daemon not launching on Linux
1 parent a1413f8 commit bdd20eb

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

seiscat/daemon/services.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def _launchd_plist_path(system=False):
156156
Description=seiscat daemon timer
157157
158158
[Timer]
159+
OnActiveSec={interval}
159160
OnUnitActiveSec={interval}
160161
Unit={service_name}
161162
Persistent=true

tests/test_daemon_services.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ def test_after_network(self):
136136
class TestRenderSystemdTimer(unittest.TestCase):
137137
"""Test that the systemd timer unit renders correctly."""
138138

139+
def test_on_active_sec_15_minutes(self):
140+
timer = render_systemd_timer(_make_config())
141+
self.assertIn('OnActiveSec=900s', timer)
142+
139143
def test_on_unit_active_sec_15_minutes(self):
140144
timer = render_systemd_timer(_make_config())
141145
# 15 minutes = 900s

0 commit comments

Comments
 (0)