mirror of
https://github.com/YunoHost-Apps/streams_ynh.git
synced 2024-09-03 20:26:20 +02:00
Much wiser approach of the Code to src transition
This commit is contained in:
parent
8428112b0d
commit
79bf776c8e
1 changed files with 8 additions and 1 deletions
|
@ -134,10 +134,17 @@ ynh_script_progression --message="Setuping cron job..." --weight=1
|
|||
|
||||
# We're ready for the moment when 'Code' is renamed 'src'
|
||||
# Check for renaming of 'Code' folder to 'src'
|
||||
if [ -d /var/www/__APP__/src ]
|
||||
if [ -d /var/www/$app/src ]
|
||||
then
|
||||
sed -i 's/Code/src/' ../conf/cronjobs
|
||||
fi
|
||||
if [ -d /var/www/$app/Code ]
|
||||
then
|
||||
sed -i "/finished/ i\# Check if 'Code' folder was renamed 'src' and adapt cronjob accordingly" conf/daily-update.sh
|
||||
sed -i "/finished/ i\if [ -d \/var\/www\/$app\/src ] ; then"
|
||||
sed -i "/finished/ i\ sed -i \'s\/Code\/src\/\' \/etc\/cron.d\/$app"
|
||||
sed -i "/finished/ i\fi"
|
||||
fi
|
||||
|
||||
# Set up cron job
|
||||
ynh_add_config --template="../conf/cronjobs" --destination="/etc/cron.d/$app"
|
||||
|
|
Loading…
Add table
Reference in a new issue