From 265b2c16335ed0cc7efd83e31fe0a45615c783b4 Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Sat, 6 Jul 2024 01:20:01 +0200 Subject: [PATCH] Add System Files --- systemd/morffix-worker.service | 18 ++++++++++++++++++ systemd/morffix.service | 19 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 systemd/morffix-worker.service create mode 100644 systemd/morffix.service diff --git a/systemd/morffix-worker.service b/systemd/morffix-worker.service new file mode 100644 index 0000000..be423a2 --- /dev/null +++ b/systemd/morffix-worker.service @@ -0,0 +1,18 @@ +[Unit] +Description=morffix worker +ConditionPathExists=/opt/morffix/morffix +After=network.target +Wants=morffix.service + +[Service] +Type=simple +User=root +LimitNOFILE=1024 +Restart=on-failure +RestartSec=10 +StartLimitIntervalSec=60 +WorkingDirectory=/opt/morffix +ExecStart=/opt/morffix/morffix + +[Install] +WantedBy=multi-user.target \ No newline at end of file diff --git a/systemd/morffix.service b/systemd/morffix.service new file mode 100644 index 0000000..72c7d43 --- /dev/null +++ b/systemd/morffix.service @@ -0,0 +1,19 @@ +[Unit] +Description=morffix +ConditionPathExists=/opt/morffix/morffix +After=network.target +Wants=postgresql@15-main.service + +[Service] +Type=simple +User=root +Group=media_library +LimitNOFILE=1024 +Restart=on-failure +RestartSec=10 +StartLimitIntervalSec=60 +WorkingDirectory=/opt/morffix +ExecStart=/opt/morffix/morffix -server + +[Install] +WantedBy=multi-user.target \ No newline at end of file