mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 13:01:51 -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
|
mkdir /var/run/clamav
|
||||||
fi
|
fi
|
||||||
chown -R clamav:clamav /var/run/clamav
|
chown -R clamav:clamav /var/run/clamav
|
||||||
if [ -f "/etc/systemd/system/multi-user.target.wants/clamav-daemon.service" ]; then
|
if [ -f "/lib/systemd/system/clamav-daemon.service" ]; then
|
||||||
file="/etc/systemd/system/multi-user.target.wants/clamav-daemon.service"
|
file="/lib/systemd/system/clamav-daemon.service"
|
||||||
if [ $( grep -ic "mkdir" $file ) -eq 0 ]; then
|
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
|
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
|
||||||
|
|
|
@ -121,10 +121,14 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# Fixing /var/run/clamav permissions
|
# Fixing /var/run/clamav permissions
|
||||||
if [ -f "/etc/systemd/system/multi-user.target.wants/clamav-daemon.service" ]; then
|
if [ -f "/lib/systemd/system/clamav-daemon.service" ]; then
|
||||||
file="/etc/systemd/system/multi-user.target.wants/clamav-daemon.service"
|
file="/lib/systemd/system/clamav-daemon.service"
|
||||||
if [ $( grep -ic "mkdir" $file ) -eq 0 ]; then
|
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
|
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
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue