From 771024bd3b24742e6c90b400747f23dc0ca5f99c Mon Sep 17 00:00:00 2001 From: Jeffrey Serio <23226432+hyperreal64@users.noreply.github.com> Date: Tue, 2 Apr 2024 22:06:54 -0500 Subject: [PATCH] Add systemd units --- systemd-user/breezewiki.service | 14 ++++++++++++++ systemd-user/gmcapsule.service | 14 ++++++++++++++ systemd-user/seed-armbian-torrents.service | 11 +++++++++++ systemd-user/seed-armbian-torrents.timer | 9 +++++++++ systemd-user/torrentstats-html.service | 11 +++++++++++ systemd-user/torrentstats-html.timer | 9 +++++++++ systemd-user/transmission-trackers.service | 13 +++++++++++++ systemd-user/transmission-trackers.timer | 9 +++++++++ 8 files changed, 90 insertions(+) create mode 100644 systemd-user/breezewiki.service create mode 100644 systemd-user/gmcapsule.service create mode 100644 systemd-user/seed-armbian-torrents.service create mode 100644 systemd-user/seed-armbian-torrents.timer create mode 100644 systemd-user/torrentstats-html.service create mode 100644 systemd-user/torrentstats-html.timer create mode 100644 systemd-user/transmission-trackers.service create mode 100644 systemd-user/transmission-trackers.timer diff --git a/systemd-user/breezewiki.service b/systemd-user/breezewiki.service new file mode 100644 index 0000000..0312dcd --- /dev/null +++ b/systemd-user/breezewiki.service @@ -0,0 +1,14 @@ +[Unit] +Description=BreezeWiki service +After=network.target + +[Service] +Type=simple +ExecStart=racket /home/jas/repos/breezewiki/dist.rkt +ExecReload=/bin/kill -HUP $MAINPID +Restart=always +SyslogIdentifier=BreezeWiki +WorkingDirectory=/home/jas/repos/breezewiki + +[Install] +WantedBy=default.target diff --git a/systemd-user/gmcapsule.service b/systemd-user/gmcapsule.service new file mode 100644 index 0000000..39c8139 --- /dev/null +++ b/systemd-user/gmcapsule.service @@ -0,0 +1,14 @@ +[Unit] +Description=GmCapsule: extensible Gemini/Titan server +After=network.target + +[Service] +Type=simple +ExecStart=/home/jas/.local/bin/gmcapsuled +ExecReload=/bin/kill -HUP $MAINPID +Restart=always +Environment="PYTHONUNBUFFERED=1" +SyslogIdentifier=gmcapsule + +[Install] +WantedBy=default.target diff --git a/systemd-user/seed-armbian-torrents.service b/systemd-user/seed-armbian-torrents.service new file mode 100644 index 0000000..b4c854a --- /dev/null +++ b/systemd-user/seed-armbian-torrents.service @@ -0,0 +1,11 @@ +[Unit] +Description=Run seed-armbian-torrents.nu +After=network.target + +[Service] +Type=oneshot +ExecStart=nu /home/jas/homelab-scripts/seed-armbian-torrents.nu +SyslogIdentifier=seed-armbian-torrents + +[Install] +WantedBy=default.target diff --git a/systemd-user/seed-armbian-torrents.timer b/systemd-user/seed-armbian-torrents.timer new file mode 100644 index 0000000..d80aa35 --- /dev/null +++ b/systemd-user/seed-armbian-torrents.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run seed-armbian-torrents.nu + +[Timer] +OnCalendar=weekly +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/systemd-user/torrentstats-html.service b/systemd-user/torrentstats-html.service new file mode 100644 index 0000000..7fbef08 --- /dev/null +++ b/systemd-user/torrentstats-html.service @@ -0,0 +1,11 @@ +[Unit] +Description=Run torrentstats-html.nu +After=network.target + +[Service] +Type=oneshot +ExecStart=nu /home/jas/homelab-scripts/torrentstats-html.nu +SyslogIdentifier=torrentstats-html + +[Install] +WantedBy=default.target diff --git a/systemd-user/torrentstats-html.timer b/systemd-user/torrentstats-html.timer new file mode 100644 index 0000000..b33b2d0 --- /dev/null +++ b/systemd-user/torrentstats-html.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run torrentstats-html.nu + +[Timer] +OnCalendar=hourly +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/systemd-user/transmission-trackers.service b/systemd-user/transmission-trackers.service new file mode 100644 index 0000000..842e5f4 --- /dev/null +++ b/systemd-user/transmission-trackers.service @@ -0,0 +1,13 @@ +[Unit] +Description=Add trackers to Transmission torrents +After=network.target network-online.target +Wants=network-online.target + +[Service] +Type=oneshot +WorkingDirectory=/home/jas/transmission-trackers +ExecStart=/home/jas/transmission-trackers/venv/bin/python transmission-trackers.py +SyslogIdentifier=transmission-trackers + +[Install] +WantedBy=default.target diff --git a/systemd-user/transmission-trackers.timer b/systemd-user/transmission-trackers.timer new file mode 100644 index 0000000..3bfd1a3 --- /dev/null +++ b/systemd-user/transmission-trackers.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Add trackers to Transmission torrents every 30 minutes + +[Timer] +OnBootSec=30s +OnUnitActiveSec=30min + +[Install] +WantedBy=timers.target