mirror of
https://github.com/YunoHost-Apps/yourls_ynh.git
synced 2024-09-03 20:35:59 +02:00
fix
This commit is contained in:
parent
93132b2227
commit
65feff7a2e
4 changed files with 17 additions and 23 deletions
|
@ -108,7 +108,13 @@ ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --targ
|
|||
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/user/config.php"
|
||||
ynh_replace_string --match_string="__RANDOM__" --replace_string="$(ynh_string_random 24)" --target_file="$final_path/user/config.php"
|
||||
|
||||
# Set permissions
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum "$final_path/user/config.php"
|
||||
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
chown -R $app: $final_path
|
||||
|
||||
# Reload Nginx and regenerate SSOwat conf
|
||||
|
@ -124,13 +130,10 @@ ynh_script_progression --message="Reloading NGINX web server..." --weight=3
|
|||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
sleep 10
|
||||
|
||||
# Start Yourls install (database table creation)
|
||||
# Start YOURLS install (database table creation)
|
||||
ynh_local_curl "admin/install.php" "install=dummy"
|
||||
sleep 10
|
||||
|
||||
# Calculate and store the config file checksum into the app settings
|
||||
ynh_store_file_checksum "$final_path/user/config.php"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
|
@ -28,14 +28,6 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=2
|
|||
# Remove a database if it exists, along with the associated user
|
||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..." --weight=2
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
|
|
|
@ -58,15 +58,6 @@ ynh_script_progression --message="Restoring YOURLS main directory..." --weight=3
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=5
|
||||
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -91,6 +82,14 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|||
|
||||
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=5
|
||||
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
|
||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -133,7 +133,7 @@ ynh_store_file_checksum --file="$final_path/user/config.php"
|
|||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set right permissions for curl installation
|
||||
# Restore permissions on app files
|
||||
chown -R $app: $final_path
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue