mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
Debian: Tolerate error in systemd/clamav-daemon.service if dir already exists
This commit is contained in:
parent
421ecfa62c
commit
a217391565
1 changed files with 2 additions and 2 deletions
|
@ -1110,8 +1110,8 @@ if [ "$clamd" = 'yes' ]; then
|
||||||
fi
|
fi
|
||||||
chown -R clamav:clamav /var/run/clamav
|
chown -R clamav:clamav /var/run/clamav
|
||||||
if [ -e "/lib/systemd/system/clamav-daemon.service" ]; then
|
if [ -e "/lib/systemd/system/clamav-daemon.service" ]; then
|
||||||
exec_pre1='ExecStartPre=/bin/mkdir -p /var/run/clamav'
|
exec_pre1='ExecStartPre=-/bin/mkdir -p /var/run/clamav'
|
||||||
exec_pre2='ExecStartPre=/bin/chown -R clamav:clamav /var/run/clamav'
|
exec_pre2='ExecStartPre=-/bin/chown -R clamav:clamav /var/run/clamav'
|
||||||
sed -i "s|\[Service\]/|[Service]\n$exec_pre1\n$exec_pre2|g" \
|
sed -i "s|\[Service\]/|[Service]\n$exec_pre1\n$exec_pre2|g" \
|
||||||
/lib/systemd/system/clamav-daemon.service
|
/lib/systemd/system/clamav-daemon.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue