mirror of
https://github.com/YunoHost-Apps/humhub_ynh.git
synced 2024-09-03 19:26:11 +02:00
Fix
This commit is contained in:
parent
37077cf41d
commit
949dd65632
4 changed files with 21 additions and 37 deletions
|
@ -24,7 +24,7 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --time --weight=1
|
||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||
|
||||
# Needed for helper "ynh_add_nginx_config"
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
@ -32,7 +32,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
#=================================================
|
||||
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --time --weight=1
|
||||
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
|
@ -65,7 +65,7 @@ fi
|
|||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating NGINX web server configuration..." --time --weight=1
|
||||
ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
|
||||
|
||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||
|
||||
|
@ -94,7 +94,7 @@ fi
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --time --weight=1
|
||||
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
@ -102,4 +102,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Change of URL completed for $app" --time --last
|
||||
ynh_script_progression --message="Change of URL completed for $app" --last
|
||||
|
|
|
@ -87,10 +87,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
# chmod 750 "$final_path"
|
||||
# chmod -R o-rwx "$final_path"
|
||||
# chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
|
|
@ -66,26 +66,22 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
|
||||
# # Set permissions on app files
|
||||
# chown -R root: $final_path
|
||||
# Set permissions on app files
|
||||
chown -R root: $final_path
|
||||
|
||||
# # Remove permission to others than $app and www-data (nginx user)
|
||||
# chmod o-rwx $final_path
|
||||
# chown $app:www-data $final_path
|
||||
# Remove permission to others than $app and www-data (nginx user)
|
||||
chmod o-rwx $final_path
|
||||
chown $app:www-data $final_path
|
||||
|
||||
# chown -R $app $final_path/assets
|
||||
# chown -R $app $final_path/protected/config
|
||||
# chown -R $app $final_path/protected/modules
|
||||
# chown -R $app $final_path/protected/runtime
|
||||
# chown -R $app $final_path/uploads/*
|
||||
chown -R $app $final_path/assets
|
||||
chown -R $app $final_path/protected/config
|
||||
chown -R $app $final_path/protected/modules
|
||||
chown -R $app $final_path/protected/runtime
|
||||
chown -R $app $final_path/uploads
|
||||
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
|
|
|
@ -95,10 +95,6 @@ then
|
|||
ynh_secure_remove --file="$final_path.old"
|
||||
fi
|
||||
|
||||
# chmod 750 "$final_path"
|
||||
# chmod -R o-rwx "$final_path"
|
||||
# chown -R $app:www-data "$final_path"
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
|
@ -138,18 +134,14 @@ ynh_replace_string --match_string="defined('YII_ENV') or define('YII_ENV', 'dev'
|
|||
#=================================================
|
||||
# MIGRATE DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Migrating database..." --weight=1
|
||||
ynh_script_progression --message="Migrating database and modules..." --weight=1
|
||||
|
||||
chown -R $app $final_path/
|
||||
chown -R $app $final_path
|
||||
|
||||
sudo -u $app /usr/bin/php$YNH_PHP_VERSION $final_path/protected/yii migrate/up --includeModuleMigrations=1
|
||||
|
||||
#=================================================
|
||||
# UPDATE MODULES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating modules..." --weight=1
|
||||
|
||||
sudo -u $app /usr/bin/php$YNH_PHP_VERSION $final_path/protected/yii module/update-all
|
||||
pushd $final_path
|
||||
php$phpversion protected/yii migrate/up --includeModuleMigrations=1
|
||||
php$phpversion protected/yii module/update-all
|
||||
popd
|
||||
|
||||
#=================================================
|
||||
# REINSTALL CRONTAB
|
||||
|
|
Loading…
Add table
Reference in a new issue