summaryrefslogtreecommitdiff
path: root/src/systemd/vyos-event-handler.service
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2022-06-06 21:33:17 +0300
committerzsdc <taras@vyos.io>2022-06-06 21:33:17 +0300
commit74454c341a57aab66151b9ef2488eb72a306c002 (patch)
tree806e55b157da50db24d544800696019dc139a59c /src/systemd/vyos-event-handler.service
parent0bbe8d655df4bc50d70aeef2d3199a73e0af9f03 (diff)
downloadvyos-1x-74454c341a57aab66151b9ef2488eb72a306c002.tar.gz
vyos-1x-74454c341a57aab66151b9ef2488eb72a306c002.zip
event-handler: T3083: Optimized event-handler
* Removed dynamic generating for systemd unit * Optimized configuration file deleting process * Added exceptions handlers to event-handler script to protect service from most obvious potential troubles * Improved logging * Moved pattern compilation outside a messages loop to avoid extra operations * Added signal handlers for proper systemd integration
Diffstat (limited to 'src/systemd/vyos-event-handler.service')
-rw-r--r--src/systemd/vyos-event-handler.service11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/systemd/vyos-event-handler.service b/src/systemd/vyos-event-handler.service
new file mode 100644
index 000000000..6afe4f95b
--- /dev/null
+++ b/src/systemd/vyos-event-handler.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=VyOS event handler
+After=network.target vyos-router.service
+
+[Service]
+Type=simple
+Restart=always
+ExecStart=/usr/bin/python3 /usr/libexec/vyos/system/vyos-event-handler.py --config /run/vyos-event-handler.conf
+
+[Install]
+WantedBy=multi-user.target