1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/streams_ynh.git synced 2024-09-03 20:26:20 +02:00

Only allow cron daily updates if release branch is used

This commit is contained in:
dragondaddy 2023-11-13 20:41:38 +01:00
parent afee1ab28a
commit b1cca218bb

View file

@ -3,7 +3,14 @@
echo " "
echo "+++ $(date) +++"
echo " "
git_branch="$(cd /var/www/__APP__ && sudo -u __APP__ \
git branch --show-current)" 2> /dev/null
if echo $git_branch | grep -q "release"
then
echo "$(date) - Updating website..."
(cd /var/www/__APP__ ; sudo -u __APP__ util/udall)
echo "$(date) - Daily update finished."
else
echo "$(date) - release branch not in use, no automatic update"
fi