diff options
author | Christian König <ckoenig@posteo.de> | 2022-05-18 23:06:36 +0300 |
---|---|---|
committer | Christian König <ckoenig@posteo.de> | 2022-05-18 23:06:36 +0300 |
commit | 08faf21b2e173094da6072b9276a63f0bf3ca6f7 (patch) | |
tree | b5232a484eec51b29d0350ea6615c87add0ffa8a /advanced | |
parent | 60615e60aa96797ee64a1bea0c8ddcbef0a1192d (diff) |
Set file owner and permission to symlinks
Signed-off-by: Christian König <ckoenig@posteo.de>
Diffstat (limited to 'advanced')
-rw-r--r-- | advanced/Templates/pihole-FTL.service | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/advanced/Templates/pihole-FTL.service b/advanced/Templates/pihole-FTL.service index a70f37b5..6ef57380 100644 --- a/advanced/Templates/pihole-FTL.service +++ b/advanced/Templates/pihole-FTL.service @@ -85,8 +85,17 @@ start() { # Backward compatibility for user-scripts that still expect log files in /var/log instead of /var/log/pihole/ # Should be removed with Pi-hole v6.0 - [ ! -f /var/log/pihole.log ] && ln -s /var/log/pihole/pihole.log /var/log/pihole.log - [ ! -f /var/log/pihole-FTL.log ] && ln -s /var/log/pihole/pihole-FTL.log /var/log/pihole-FTL.log + if [ ! -f /var/log/pihole.log ]; then + ln -s /var/log/pihole/pihole.log /var/log/pihole.log + chown pihole:pihole /var/log/pihole.log + chmod -f 0644 /var/log/pihole.log + + fi + if [ ! -f /var/log/pihole-FTL.log ]; then + ln -s /var/log/pihole/pihole-FTL.log /var/log/pihole-FTL.log + chown pihole:pihole /var/log/pihole-FTL.log + chmod -f 0644 /var/log/pihole-FTL.log + fi if setcap CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_NET_ADMIN,CAP_SYS_NICE,CAP_IPC_LOCK,CAP_CHOWN+eip "/usr/bin/pihole-FTL"; then su -s /bin/sh -c "/usr/bin/pihole-FTL" pihole |