Outils pour utilisateurs

Outils du site


exemple_de_fichier_service_pour_systemd

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
exemple_de_fichier_service_pour_systemd [2021/08/01 12:23] tomampliusexemple_de_fichier_service_pour_systemd [2022/01/02 18:04] (Version actuelle) tomamplius
Ligne 1: Ligne 1:
 +====== Exemple de fichier service pour systemd ======
 +
 <code> <code>
 [Unit] [Unit]
-Description=description du service +Description=service mautrix-syncproxy 
-Documentation=URL vers la documentation+Documentation=https://github.com/mautrix/syncproxy
  
-#Default case 
 After=network.target After=network.target
- 
-# case when PostgreSQL is on localhost 
-# After=network.target postgresql.service 
-# Requires=postgresql.service 
  
 [Service] [Service]
-User=librephotos +User=mautrix-syncproxy 
-Group=librephotos  +Group=mautrix-syncproxy 
-EnvironmentFile=/etc/librephotos/librephotos-backend.env +EnvironmentFile=/etc/default/mautrix-syncproxy 
-ExecStart=/usr/lib/librephotos/bin/librephotos-backend +ExecStart=/usr/bin/mautrix-syncproxy 
-WorkingDirectory=/usr/lib/librephotos/backend+WorkingDirectory=/var/lib/mautrix-syncproxy 
 +Restart=on-failure 
 +RestartSec=30s 
 +ReadWritePaths=/var/lib/mautrix-syncproxy 
 +NoNewPrivileges=yes 
 +MemoryDenyWriteExecute=true 
 +PrivateDevices=yes 
 +PrivateTmp=yes 
 +ProtectHome=yes 
 +ProtectSystem=strict 
 +ProtectControlGroups=true 
 +RestrictSUIDSGID=true 
 +RestrictRealtime=true 
 +LockPersonality=true 
 +ProtectKernelLogs=true 
 +ProtectKernelTunables=true 
 +ProtectHostname=true 
 +ProtectKernelModules=true 
 +PrivateUsers=true 
 +ProtectClock=true 
 +SystemCallArchitectures=native 
 +SystemCallErrorNumber=EPERM 
 +SystemCallFilter=@system-service
  
 [Install] [Install]
 WantedBy=multi-user.target WantedBy=multi-user.target
 </code> </code>
 +source : https://www.freedesktop.org/software/systemd/man/systemd.service.html
exemple_de_fichier_service_pour_systemd.txt · Dernière modification : 2022/01/02 18:04 de tomamplius

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki