2017-07-05 23:56:18 +02:00
|
|
|
[Unit]
|
|
|
|
Description=GNU Health server
|
|
|
|
After=syslog.target
|
|
|
|
Requires=postgresql.service
|
2017-08-18 15:03:55 +02:00
|
|
|
Conflicts=trytond.service
|
2020-04-05 10:09:42 +02:00
|
|
|
|
|
|
|
[Service]
|
|
|
|
# some security settings
|
2020-03-31 18:09:56 +02:00
|
|
|
PrivateTmp=true
|
|
|
|
ProtectSystem=true
|
|
|
|
ProtectHome=true
|
|
|
|
ProtectKernelModules=true
|
|
|
|
ProtectKernelTunables=true
|
|
|
|
ProtectControlGroups=true
|
|
|
|
MountFlags=private
|
|
|
|
NoNewPrivileges=true
|
|
|
|
PrivateDevices=true
|
|
|
|
MemoryDenyWriteExecute=true
|
2017-07-05 23:56:18 +02:00
|
|
|
|
|
|
|
Type=simple
|
|
|
|
User=tryton
|
|
|
|
Group=tryton
|
|
|
|
PIDFile=/var/lib/trytond/trytond.pid
|
|
|
|
|
|
|
|
ExecStart=/usr/bin/trytond --config /etc/tryton/trytond.conf --pidfile=/var/lib/tryton/trytond.pid --logconf=/etc/tryton/trytond_log.conf
|
|
|
|
|
|
|
|
# Give a reasonable amount of time for the server to start up/shut down
|
|
|
|
TimeoutSec=300
|
|
|
|
|
|
|
|
# We rely on systemd to restart trytond if it dies
|
|
|
|
Restart=always
|
|
|
|
|
2018-12-28 15:01:07 +01:00
|
|
|
#Set the environment variables that GNU Health needs
|
|
|
|
EnvironmentFile=/etc/tryton/gnuhealthrc
|
|
|
|
|
2017-07-05 23:56:18 +02:00
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|