From 74454c341a57aab66151b9ef2488eb72a306c002 Mon Sep 17 00:00:00 2001 From: zsdc Date: Mon, 6 Jun 2022 21:33:17 +0300 Subject: 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 --- src/systemd/vyos-event-handler.service | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/systemd/vyos-event-handler.service (limited to 'src/systemd/vyos-event-handler.service') 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 -- cgit v1.2.3