mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
Correcting path for clamav-daemon.service
This commit is contained in:
parent
17096714ed
commit
fa73d16538
2 changed files with 9 additions and 5 deletions
|
@ -1045,8 +1045,8 @@ 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 [ -f "/lib/systemd/system/clamav-daemon.service" ]; then
|
||||
file="/lib/systemd/system/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
|
||||
|
|
|
@ -121,10 +121,14 @@ fi
|
|||
|
||||
|
||||
# Fixing /var/run/clamav permissions
|
||||
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 [ -f "/lib/systemd/system/clamav-daemon.service" ]; then
|
||||
file="/lib/systemd/system/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
|
||||
service clamav-daemon restart
|
||||
if [ ! -d "/var/run/clamav" ]; then
|
||||
mkdir /var/run/clamav
|
||||
fi
|
||||
chown -R clamav:clamav /var/run/clamav
|
||||
service clamav-daemon restart /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue