mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
Persistent fix for /var/run/clamav permissions
This commit is contained in:
parent
dfebb3fec7
commit
17096714ed
1 changed files with 7 additions and 0 deletions
|
@ -1045,6 +1045,13 @@ if [ "$clamd" = 'yes' ]; then
|
|||
mkdir /var/run/clamav
|
||||
fi
|
||||
chown -R clamav:clamav /var/run/clamav
|
||||
if [ -f "/etc/systemd/system/multi-user.target.wants/clamav-daemon.service" ]; then
|
||||
file="/etc/systemd/system/multi-user.target.wants/clamav-daemon.service"
|
||||
if [ $( grep -ic "mkdir" $file ) -eq 0 ]; then
|
||||
sed -i "s/\[Service\]/\[Service\]\nExecStartPre = \/bin\/mkdir -p \/var\/run\/clamav\nExecStartPre = \/bin\/chown -R clamav:clamav \/var\/run\/clamav/g" $file
|
||||
fi
|
||||
fi
|
||||
|
||||
service clamav-daemon start
|
||||
check_result $? "clamav-daeom start failed"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue