2020-07-12 04:38:39 +03:00
|
|
|
[Unit]
|
|
|
|
Description=kf2-srv force attr service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=simple
|
|
|
|
StandardOutput=null
|
|
|
|
StandardError=null
|
|
|
|
EnvironmentFile=/etc/kf2-srv/kf2-srv.conf
|
2020-07-12 23:32:25 +03:00
|
|
|
ExecStart=/bin/bash -c 'declare -A ModeNames MutNames; source /etc/kf2-srv/kf2-srv.conf; /usr/bin/inotifywait -qmr -e create -e moved_to --format %%w%%f /var/log/kf2-srv /var/log/kf2-srv-beta /etc/kf2-srv/instances /etc/kf2-srv/instances-beta | while read File; do if echo "$File" | grep -Piq "\.log$"; then chmod "$ForceLogPermissions" "$File"; chown :"$ForceLogGroup" "$File"; elif echo "$File" | grep -Piq "\.ini$"; then chmod "$ForceIniPermissions" "$File"; chown :"$ForceIniGroup" "$File"; fi; done'
|
2020-07-12 04:38:39 +03:00
|
|
|
Restart=always
|
|
|
|
|
|
|
|
NoNewPrivileges=yes
|
|
|
|
PrivateTmp=true
|
|
|
|
PrivateDevices=true
|
|
|
|
ProtectHome=true
|
|
|
|
ProtectSystem=true
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|