mirror of
https://github.com/YunoHost-Apps/streams_ynh.git
synced 2024-09-03 20:26:20 +02:00
Work on upgrade script
This commit is contained in:
parent
bfd4342580
commit
6eb0d63928
1 changed files with 22 additions and 28 deletions
|
@ -16,8 +16,6 @@ ynh_script_progression --message="Loading settings..." --weight=1
|
||||||
|
|
||||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||||
|
|
||||||
ynh_app_setting_get --app=$app --key=git_clone
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# CHECK VERSION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -57,8 +55,9 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
git_dir="$install_dir/.git"
|
||||||
# ynh_setup_source --dest_dir="$install_dir" --keep="store/ .htconfig.php php.log"
|
if [ ! -d "$git_dir" ]
|
||||||
|
then
|
||||||
|
|
||||||
# First we save what we need to keep
|
# First we save what we need to keep
|
||||||
mv $install_dir/store $data_dir/
|
mv $install_dir/store $data_dir/
|
||||||
|
@ -82,16 +81,11 @@ then
|
||||||
mv $data_dir/php.log $install_dir/
|
mv $data_dir/php.log $install_dir/
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
|
chown -R $app:www-data "$install_dir"
|
||||||
chmod -R 775 $install_dir/store $install_dir/cache
|
chmod -R 775 $install_dir/store $install_dir/cache
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p "$install_dir/store"
|
|
||||||
mkdir -p "$install_dir/cache/smarty3"
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
|
||||||
chown -R $app:www-data "$install_dir"
|
|
||||||
chmod -R 775 $install_dir/store $install_dir/cache
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PHP-FPM CONFIGURATION
|
# PHP-FPM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue