diff --git a/data/lib/systemd/system/plinth.service b/data/lib/systemd/system/plinth.service new file mode 100644 index 000000000..1685c7bc1 --- /dev/null +++ b/data/lib/systemd/system/plinth.service @@ -0,0 +1,29 @@ +# +# This file is part of Plinth. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# + +[Unit] +Description=Plinth Web Interface +Documentation=man:plinth(1) +After=network.target + +[Service] +ExecStart=/usr/bin/plinth --no-daemon +Restart=on-failure +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/setup.py b/setup.py index 8186d70ec..5d89f4fe3 100755 --- a/setup.py +++ b/setup.py @@ -133,6 +133,8 @@ setuptools.setup( ['data/etc/apache2/sites-available/plinth.conf', 'data/etc/apache2/sites-available/plinth-ssl.conf']), ('/etc/sudoers.d', ['data/etc/sudoers.d/plinth']), + ('/lib/systemd/system', + ['data/lib/systemd/system/plinth.service']), ('/usr/share/plinth/actions', glob.glob(os.path.join('actions', '*'))), ('/usr/share/man/man1', ['doc/plinth.1']),