From b0072b435f628649a933436c0acfb9c9dd137fb7 Mon Sep 17 00:00:00 2001 From: Thomas Riccardi Date: Mon, 17 Oct 2016 22:52:50 +0200 Subject: [PATCH] Improve debian systemd service file. * better description and documentation * use spectrum2 dedicated user * restart on failure, without spamming other servers * no need for a short TimeoutStopSec: spectrum2 supposedly correctly shuts down * no need for Alias: the current filename is already OK * add WantedBy=multi-user.target for install --- packaging/debian/debian/spectrum2.service | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/packaging/debian/debian/spectrum2.service b/packaging/debian/debian/spectrum2.service index 425f8d266..79d87813c 100644 --- a/packaging/debian/debian/spectrum2.service +++ b/packaging/debian/debian/spectrum2.service @@ -1,13 +1,21 @@ [Unit] -Description=spectrum2 +Description=An open source instant messaging transport +Documentation=http://spectrum.im/documentation/ After=network.target [Service] Type=forking + +User=spectrum2 + +RestartSec=5 +Restart=on-failure + ExecStart=/usr/bin/spectrum2_manager start -TimeoutStopSec=3 ExecStop=/usr/bin/spectrum2_manager stop ExecReload=/usr/bin/spectrum2_manager restart +RuntimeDirectory=spectrum2 + [Install] -Alias=spectrum2 \ No newline at end of file +WantedBy=multi-user.target