diff --git a/bootshorn-process.service b/bootshorn-process.service new file mode 100644 index 0000000..9b33fde --- /dev/null +++ b/bootshorn-process.service @@ -0,0 +1,8 @@ +[Unit] +Description=Bootshorn Process Recording +After=bootshorn-record.service + +[Service] +Type=oneshot +WorkingDirectory=/opt/bootshorn +ExecStart=/opt/bootshorn/process \ No newline at end of file diff --git a/bootshorn-process.timer b/bootshorn-process.timer new file mode 100644 index 0000000..cf2b2d1 --- /dev/null +++ b/bootshorn-process.timer @@ -0,0 +1,11 @@ +[Unit] +Description=Run Bootshorn Processing every 10 minutes + +[Timer] +OnBootSec=2min +OnUnitActiveSec=10min +AccuracySec=30s +Unit=bootshorn-process.service + +[Install] +WantedBy=timers.target \ No newline at end of file diff --git a/bootshorn-record.service b/bootshorn-record.service new file mode 100644 index 0000000..ff88109 --- /dev/null +++ b/bootshorn-record.service @@ -0,0 +1,13 @@ +[Unit] +Description=Bootshorn Recorder +After=network.target + +[Service] +Type=simple +WorkingDirectory=/opt/bootshorn +ExecStart=/opt/bootshorn/record +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/install b/install new file mode 100755 index 0000000..f11db23 --- /dev/null +++ b/install @@ -0,0 +1,8 @@ +#!/bin/sh + +cp bootshorn-record.service /usr/local/lib/systemd/system +cp bootshorn-process.service /usr/local/lib/systemd/system +cp bootshorn-process.timer /usr/local/lib/systemd/system +systemctl daemon-reload +systemctl enable --now bootshorn-record.service +systemctl enable --now bootshorn-process.timer