Update postinst

This commit is contained in:
myvesta 2020-04-11 00:06:24 +02:00 committed by GitHub
commit e7dbb91b25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,8 +23,11 @@ if [ "$check_apt" -eq 1 ]; then
echo "deb http://apt.myvestacp.com/$codename/ $codename vesta" > /etc/apt/sources.list.d/vesta.list
fi
if [ -f "/var/spool/cron/crontabs/root" ]; then
check_cron=$(grep -c '6 sudo find /home/' /var/spool/cron/crontabs/root)
else
check_cron=0
fi
if [ "$check_cron" -eq 0 ]; then
crontab -l | { cat; echo "10 2 * * 6 sudo find /home/*/tmp/ -type f -mtime +5 -exec rm {} \;"; } | crontab -
fi