mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 05:14:10 -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"
|
||||
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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue