diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index f6de9e70..9517e4ef 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -1894,7 +1894,9 @@ command="sudo $VESTA/bin/v-update-user-stats" $VESTA/bin/v-add-cron-job 'admin' '20' '00' '*' '*' '*' "$command" command="sudo $VESTA/bin/v-update-sys-rrd" $VESTA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command" -service cron restart +command="sudo $VESTA/bin/v-fix-website-permissions-for-all-websites > /dev/null 2>&1" +$VESTA/bin/v-add-cron-job 'admin' '05' '03' '*' '*' '*' "$command" +systemctl restart cron.service echo "== Building inititall rrd images" $VESTA/bin/v-update-sys-rrd diff --git a/src/deb/vesta/postinst b/src/deb/vesta/postinst index 68252789..d8a22ee1 100755 --- a/src/deb/vesta/postinst +++ b/src/deb/vesta/postinst @@ -21,10 +21,20 @@ if [ ! -d "/usr/local/vesta/data/upgrades" ]; then mkdir -p /usr/local/vesta/data/upgrades fi +VESTA="/usr/local/vesta" + # show changelog after update echo "1" > /usr/local/vesta/data/upgrades/show_changelog chmod a=rw /usr/local/vesta/data/upgrades/show_changelog +# Fixing permissions for all websites +if ! grep -q "fix-website-permissions-for-all-websites" /usr/local/vesta/data/users/admin/cron.conf; then + echo "== Fixing permissions for all websites" + command="sudo $VESTA/bin/v-fix-website-permissions-for-all-websites > /dev/null 2>&1" + $VESTA/bin/v-add-cron-job 'admin' '05' '03' '*' '*' '*' "$command" + systemctl restart cron.service +fi + if ! grep -q "FILEMANAGER_KEY='FREEFM'" /usr/local/vesta/conf/vesta.conf; then echo "== Adding FileManager license to vesta.conf" echo "FILEMANAGER_KEY='FREEFM'" >> /usr/local/vesta/conf/vesta.conf