mirror of
https://github.com/YunoHost-Apps/cypht_ynh.git
synced 2024-09-03 18:26:09 +02:00
add .env on upgrade
This commit is contained in:
parent
987f9e1ce8
commit
5ae9e75b8c
2 changed files with 8 additions and 18 deletions
|
@ -66,7 +66,7 @@ ynh_install_composer --install_args="--ignore-platform-reqs"
|
|||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/.env.example" --destination="$install_dir/.env"
|
||||
ynh_add_config --template=".env.example" --destination="$install_dir/.env"
|
||||
|
||||
chmod 400 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
|
|
@ -15,12 +15,6 @@ source /usr/share/yunohost/helpers
|
|||
|
||||
timezone=$(cat /etc/timezone)
|
||||
|
||||
#=================================================
|
||||
# CHECK VERSION
|
||||
#=================================================
|
||||
|
||||
upgrade_type=$(ynh_check_app_version_changed)
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
#=================================================
|
||||
|
@ -49,14 +43,10 @@ fi
|
|||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=4
|
||||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=4
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep="hm3.ini"
|
||||
fi
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$install_dir" --keep=".env"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
@ -77,12 +67,12 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
#ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
#ynh_add_config --template="../conf/hm3.sample.ini" --destination="$install_dir/hm3.ini"
|
||||
ynh_add_config --template=".env.example" --destination="$install_dir/.env"
|
||||
|
||||
#chmod 400 "$install_dir/hm3.ini"
|
||||
#chown $app:$app "$install_dir/hm3.ini"
|
||||
chmod 400 "$install_dir/.env"
|
||||
chown $app:$app "$install_dir/.env"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
|
|
Loading…
Add table
Reference in a new issue