We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f799572 commit 37fa99bCopy full SHA for 37fa99b
upd/update-centos7-v16-to-v17.sh
@@ -71,6 +71,14 @@ if [ -f "/etc/clamd.conf" ] ; then
71
chown clam:clam /var/log/clamav /var/run/clamav
72
if [ "$release" -eq '7' ]; then
73
sed -i "s/nofork/foreground/" /usr/lib/systemd/system/clamd.service
74
+ file="/usr/lib/systemd/system/clamd.service"
75
+ if [ $( grep -ic "mkdir" $file ) -eq 0 ]; then
76
+ 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
81
82
systemctl daemon-reload
83
fi
84
0 commit comments