mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
Add systemd service file
- When running in an environment without systemd, the changes are completely ignored. - When running under systemd, the patch introduces a systemd native service file to take advantages of nice feature provided by systemd. - One of the feature currently taken advantage of is the ability to restart the service automatically if it ever crashes or exits with error. - Another feature is that when we wish to kill Plinth all the processes under the cgroup are killed as well.
This commit is contained in:
parent
13e0707b09
commit
2a83f29b8b
29
data/lib/systemd/system/plinth.service
Normal file
29
data/lib/systemd/system/plinth.service
Normal file
@ -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 <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
[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
|
||||
2
setup.py
2
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']),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user