2018-04-14 22:02:50 +02:00
|
|
|
[Unit]
|
2023-05-22 23:31:46 +02:00
|
|
|
Description=__APP__: personal finance manager
|
2018-04-14 22:02:50 +02:00
|
|
|
After=syslog.target network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
User=__APP__
|
|
|
|
Group=__APP__
|
2023-05-22 23:31:46 +02:00
|
|
|
WorkingDirectory=__INSTALL_DIR__/
|
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
|
2023-05-22 23:31:46 +02:00
|
|
|
ExecStart=__INSTALL_DIR__/bin/kresus.js --config __INSTALL_DIR__/config.ini
|
2018-04-14 22:02:50 +02:00
|
|
|
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
|
2022-06-27 16:56:44 +02:00
|
|
|
# PrivateUsers=true does not work on Debian 11
|
|
|
|
PrivateUsers=false
|
2022-05-21 15:44:47 +02:00
|
|
|
ProtectClock=true
|
|
|
|
ProtectControlGroups=true
|
2023-05-22 23:31:46 +02:00
|
|
|
# See https://github.com/systemd/systemd/issues/7153
|
|
|
|
ProtectHome=false
|
2022-05-21 15:44:47 +02:00
|
|
|
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
|
2022-07-01 08:29:25 +02:00
|
|
|
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap
|
2022-05-21 15:44:47 +02:00
|
|
|
SystemCallErrorNumber=EPERM
|
2023-05-22 23:31:46 +02:00
|
|
|
ReadWritePaths=__DATA_DIR__
|
2018-04-14 22:02:50 +02:00
|
|
|
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|