mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Set file owner and permission to symlinks
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
60615e60aa
commit
08faf21b2e
1 changed files with 11 additions and 2 deletions
|
@ -85,8 +85,17 @@ start() {
|
||||||
|
|
||||||
# Backward compatibility for user-scripts that still expect log files in /var/log instead of /var/log/pihole/
|
# 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
|
# Should be removed with Pi-hole v6.0
|
||||||
[ ! -f /var/log/pihole.log ] && ln -s /var/log/pihole/pihole.log /var/log/pihole.log
|
if [ ! -f /var/log/pihole.log ]; then
|
||||||
[ ! -f /var/log/pihole-FTL.log ] && ln -s /var/log/pihole/pihole-FTL.log /var/log/pihole-FTL.log
|
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
|
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
|
su -s /bin/sh -c "/usr/bin/pihole-FTL" pihole
|
||||||
|
|
Loading…
Reference in a new issue