2018-04-14 22:02:50 +02:00
|
|
|
[Unit]
|
|
|
|
Description=__APP__
|
|
|
|
After=syslog.target network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
User=__APP__
|
|
|
|
Group=__APP__
|
2022-06-17 03:00:20 +02:00
|
|
|
WorkingDirectory=__FINALPATH__/
|
2022-06-15 01:48:45 +02:00
|
|
|
Environment="__YNH_NODE_LOAD_PATH__"
|
2018-04-14 22:02:50 +02:00
|
|
|
Environment=NODE_ENV=production
|
|
|
|
ExecStart=__FINALPATH__/bin/kresus.js --config __FINALPATH__/config.ini
|
|
|
|
Restart=always
|
2022-06-17 03:00:20 +02:00
|
|
|
StandardOutput=syslog
|
|
|
|
StandardError=syslog
|
|
|
|
SyslogIdentifier=__APP__
|
2022-05-21 15:44:47 +02:00
|
|
|
# /var/log is implied
|
|
|
|
LogsDirectory=__APP__
|
|
|
|
|
|
|
|
AmbientCapabilities=
|
|
|
|
CapabilityBoundingSet=
|
|
|
|
LockPersonality=true
|
|
|
|
#Not compatible with NodeJS
|
|
|
|
#MemoryDenyWriteExecute=true
|
|
|
|
NoNewPrivileges=true
|
|
|
|
PrivateDevices=true
|
|
|
|
PrivateTmp=true
|
|
|
|
PrivateUsers=true
|
|
|
|
ProtectClock=true
|
|
|
|
ProtectControlGroups=true
|
|
|
|
ProtectHome=true
|
|
|
|
ProtectHostname=true
|
|
|
|
ProtectKernelLogs=true
|
|
|
|
ProtectKernelModules=true
|
|
|
|
ProtectKernelTunables=true
|
|
|
|
ProtectProc=invisible
|
|
|
|
ProtectSystem=strict
|
|
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
|
|
|
|
RestrictNamespaces=true
|
|
|
|
RestrictRealtime=true
|
|
|
|
RestrictSUIDSGID=true
|
|
|
|
#SecureBits=noroot-locked
|
|
|
|
SystemCallArchitectures=native
|
|
|
|
SystemCallFilter=@system-service
|
|
|
|
SystemCallErrorNumber=EPERM
|
2022-06-17 03:00:20 +02:00
|
|
|
|
2019-12-07 22:39:35 +01:00
|
|
|
# to allow this systemd service to use sendmail.
|
|
|
|
# references:
|
|
|
|
# https://bugs.archlinux.org/task/57721
|
|
|
|
# https://linux.m2osw.com/snapwebsites-postfixpostdrop18189-warning-mailqueueenter-create-file-maildrop25937318189-permission
|
|
|
|
# Future wait for this ticket to be resolved: https://github.com/YunoHost/issues/issues/947
|
|
|
|
SupplementaryGroups=postdrop
|
|
|
|
ReadWritePaths=__FINALPATH__/config.ini __FINALPATH__/data/ /var/spool/postfix/maildrop/
|
2018-04-14 22:02:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|