mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 13:24:25 -07:00
Implement cron job for fixing website permissions
This commit is contained in:
parent
cc09de9b6e
commit
c1f2a02fb8
2 changed files with 13 additions and 1 deletions
|
@ -1894,7 +1894,9 @@ command="sudo $VESTA/bin/v-update-user-stats"
|
||||||
$VESTA/bin/v-add-cron-job 'admin' '20' '00' '*' '*' '*' "$command"
|
$VESTA/bin/v-add-cron-job 'admin' '20' '00' '*' '*' '*' "$command"
|
||||||
command="sudo $VESTA/bin/v-update-sys-rrd"
|
command="sudo $VESTA/bin/v-update-sys-rrd"
|
||||||
$VESTA/bin/v-add-cron-job 'admin' '*/5' '*' '*' '*' '*' "$command"
|
$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"
|
echo "== Building inititall rrd images"
|
||||||
$VESTA/bin/v-update-sys-rrd
|
$VESTA/bin/v-update-sys-rrd
|
||||||
|
|
|
@ -21,10 +21,20 @@ if [ ! -d "/usr/local/vesta/data/upgrades" ]; then
|
||||||
mkdir -p /usr/local/vesta/data/upgrades
|
mkdir -p /usr/local/vesta/data/upgrades
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
VESTA="/usr/local/vesta"
|
||||||
|
|
||||||
# show changelog after update
|
# show changelog after update
|
||||||
echo "1" > /usr/local/vesta/data/upgrades/show_changelog
|
echo "1" > /usr/local/vesta/data/upgrades/show_changelog
|
||||||
chmod a=rw /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
|
if ! grep -q "FILEMANAGER_KEY='FREEFM'" /usr/local/vesta/conf/vesta.conf; then
|
||||||
echo "== Adding FileManager license to vesta.conf"
|
echo "== Adding FileManager license to vesta.conf"
|
||||||
echo "FILEMANAGER_KEY='FREEFM'" >> /usr/local/vesta/conf/vesta.conf
|
echo "FILEMANAGER_KEY='FREEFM'" >> /usr/local/vesta/conf/vesta.conf
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue