File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ servername=$(hostname -f)
1313
1414
1515# PATH fix
16- if [ $( grep -ic " VESTA " /etc/profile.d/vesta.sh ) -eq 0 ]; then
16+ if [ ! -f " /etc/profile.d/vesta.sh" ]; then
1717 echo " export VESTA='$VESTA '" > /etc/profile.d/vesta.sh
1818fi
1919if [ $( grep -ic " vesta" /root/.bash_profile ) -eq 0 ]; then
6868
6969# Fix for clamav: /var/run ownership and foreground option
7070if [ -f " /etc/clamd.conf" ] ; then
71- chown clam:clam /var/log/clamav /var/run/clamav
71+ if [ ! -d " /var/run/clamav" ]; then
72+ mkdir /var/run/clamav
73+ fi
74+ chown -R clam:clam /var/run/clamav
75+ chown -R clam:clam /var/log/clamav
7276 if [ " $release " -eq ' 7' ]; then
7377 sed -i " s/nofork/foreground/" /usr/lib/systemd/system/clamd.service
7478 file=" /usr/lib/systemd/system/clamd.service"
7579 if [ $( grep -ic " mkdir" $file ) -eq 0 ]; then
7680 sed -i " s/Type = simple/Type = simple\nExecStartPre = \/usr\/bin\/mkdir -p \/var\/run\/clamav\nExecStartPre = \/usr\/bin\/chown -R clam:clam \/var\/run\/clamav/g" $file
77- if [ ! -d " /var/run/clamav" ]; then
78- mkdir /var/run/clamav
79- fi
80- chown -R clam:clam /var/run/clamav
8181 fi
8282 systemctl daemon-reload
83+ /bin/systemctl restart clamd.service
8384 fi
8485fi
8586
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ apt-get update > /dev/null 2>&1
1313
1414
1515# PATH fix
16- if [ $( grep -ic " VESTA " /etc/profile.d/vesta.sh ) -eq 0 ]; then
16+ if [ ! -f " /etc/profile.d/vesta.sh" ]; then
1717 echo " export VESTA='$VESTA '" > /etc/profile.d/vesta.sh
1818fi
1919if [ $( grep -ic " vesta" /root/.bash_profile ) -eq 0 ]; then
You can’t perform that action at this time.
0 commit comments