mirror of
https://github.com/myvesta/vesta
synced 2025-07-06 04:51:54 -07:00
Final adjustment for update-centos7 and update-debian8
This commit is contained in:
parent
37fa99b757
commit
70d26175ea
2 changed files with 8 additions and 7 deletions
|
@ -13,7 +13,7 @@ servername=$(hostname -f)
|
|||
|
||||
|
||||
# PATH fix
|
||||
if [ $( grep -ic "VESTA" /etc/profile.d/vesta.sh ) -eq 0 ]; then
|
||||
if [ ! -f "/etc/profile.d/vesta.sh" ]; then
|
||||
echo "export VESTA='$VESTA'" > /etc/profile.d/vesta.sh
|
||||
fi
|
||||
if [ $( grep -ic "vesta" /root/.bash_profile ) -eq 0 ]; then
|
||||
|
@ -68,18 +68,19 @@ fi
|
|||
|
||||
# Fix for clamav: /var/run ownership and foreground option
|
||||
if [ -f "/etc/clamd.conf" ] ; then
|
||||
chown clam:clam /var/log/clamav /var/run/clamav
|
||||
if [ ! -d "/var/run/clamav" ]; then
|
||||
mkdir /var/run/clamav
|
||||
fi
|
||||
chown -R clam:clam /var/run/clamav
|
||||
chown -R clam:clam /var/log/clamav
|
||||
if [ "$release" -eq '7' ]; then
|
||||
sed -i "s/nofork/foreground/" /usr/lib/systemd/system/clamd.service
|
||||
file="/usr/lib/systemd/system/clamd.service"
|
||||
if [ $( grep -ic "mkdir" $file ) -eq 0 ]; then
|
||||
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
|
||||
if [ ! -d "/var/run/clamav" ]; then
|
||||
mkdir /var/run/clamav
|
||||
fi
|
||||
chown -R clam:clam /var/run/clamav
|
||||
fi
|
||||
systemctl daemon-reload
|
||||
/bin/systemctl restart clamd.service
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ apt-get update > /dev/null 2>&1
|
|||
|
||||
|
||||
# PATH fix
|
||||
if [ $( grep -ic "VESTA" /etc/profile.d/vesta.sh ) -eq 0 ]; then
|
||||
if [ ! -f "/etc/profile.d/vesta.sh" ]; then
|
||||
echo "export VESTA='$VESTA'" > /etc/profile.d/vesta.sh
|
||||
fi
|
||||
if [ $( grep -ic "vesta" /root/.bash_profile ) -eq 0 ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue