From 8c9236ec3de0fb0863bf44b2e0e5741f1e0f851e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 7 Oct 2022 19:09:57 -0500 Subject: [PATCH] add systemd service file Signed-off-by: Jeff Carr --- .../lib/systemd/system/mattermost.service | 18 ++++++++++++++++++ .gitignore | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .debian/files/lib/systemd/system/mattermost.service diff --git a/.debian/files/lib/systemd/system/mattermost.service b/.debian/files/lib/systemd/system/mattermost.service new file mode 100644 index 0000000..3189c3c --- /dev/null +++ b/.debian/files/lib/systemd/system/mattermost.service @@ -0,0 +1,18 @@ +[Unit] +Description=Mattermost +After=network.target +After=postgresql.service +BindsTo=postgresql.service +[Service] +Type=notify +ExecStart=/opt/mattermost/bin/mattermost +TimeoutStartSec=3600 +KillMode=mixed +Restart=always +RestartSec=10 +WorkingDirectory=/opt/mattermost +User=mattermost +Group=mattermost +LimitNOFILE=49152 +[Install] +WantedBy=multi-user.target diff --git a/.gitignore b/.gitignore index 1c8cab3..fc071e9 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ .debian/data.tar.xz .debian/DEBIAN/md5sums .debian/files/opt/ -mattermost* +mattermost*tar.gz