1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/simple-torrent_ynh.git synced 2024-09-03 20:26:18 +02:00
simple-torrent_ynh/conf/systemd.service
Éric Gaspar dccb95d60b
Testing (#77)
* Update upgrade

* Update manifest.json

* Auto-update README

* Update restore

* Update remove

* Create DESCRIPTION.md

* Auto-update README

* Update DESCRIPTION.md

* Auto-update README

* Create updater.sh

* Update arm64.src

* Update manifest.json

* Auto-update README

* Update updater.sh

* Update updater.sh

* Update manifest.json

* Upgrade to version 1.3.7 (#62)

* Upgrade to v1.3.7

* Auto-update README

Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: Yunohost-Bot <>

* Update manifest.json

* Update check_process

* keep config (#67)

* Update upgrade

* Update manifest.json

* Auto-update README

* Auto-update README

* 4.3

* Update manifest.json

* Auto-update README

* Update manifest.json

* Auto-update README

* Update upgrade

* fix linter (#72)

* Update manifest.json

* Auto-update README

* Auto-update README

* Fix linter

* Update manifest.json

* Delete .DS_Store

* Delete .DS_Store

* Delete .DS_Store

* V2 (#76)

* Auto-update README

* v2

* v2

* Update change_url

* Delete .DS_Store

* v2

* Auto-update README

* Auto-update README

* fix

* Update restore

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>

* Auto-update README

* Auto-update README

* fix

* Update manifest.toml

* Auto-update README

---------

Co-authored-by: Yunohost-Bot <>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost-bot@users.noreply.github.com>
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
2023-02-18 18:19:40 +01:00

46 lines
1.6 KiB
Desktop File

[Unit]
Description=Simple Torrent web server
After=network.target
[Service]
Type=simple
User=__APP__
Group=__APP__
Environment=PORT=__PORT__
WorkingDirectory=__INSTALL_DIR__
ExecStart=__INSTALL_DIR__/__APP__ -c __INSTALL_DIR__/config.yml --host 127.0.0.1
Restart=always
RestartSec=3
# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these
# .. but this should be a good baseline
# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
NoNewPrivileges=yes
PrivateTmp=yes
PrivateDevices=yes
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
DevicePolicy=closed
ProtectSystem=full
ProtectControlGroups=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
LockPersonality=yes
SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap
# Denying access to capabilities that should not be relevant for webapps
# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html
CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD
CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE
CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT
CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK
CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM
CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG
CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE
CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW
CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG
[Install]
WantedBy=multi-user.target