mirror of
https://github.com/YunoHost-Apps/noalyss_ynh.git
synced 2024-09-03 19:46:20 +02:00
Fix major typo in restore script
This commit is contained in:
parent
12ca8a141f
commit
27ac102972
2 changed files with 4 additions and 3 deletions
|
@ -123,6 +123,9 @@ ynh_add_config --template="../conf/noalyss.conf" --destination="$final_path/incl
|
||||||
chmod 650 "$final_path/include/config.inc.php"
|
chmod 650 "$final_path/include/config.inc.php"
|
||||||
chown $app: "$final_path/include/config.inc.php"
|
chown $app: "$final_path/include/config.inc.php"
|
||||||
|
|
||||||
|
# Make sure to keep an archive of Noalyss' install.php script in case Noalyss' admin user should be updated in the future since the original one will be deleted at the end of install process (cf. instructions in config.inc.php)
|
||||||
|
cp "$final_path/html/install.php" "$final_path/html/install.php.archive"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP LOGROTATE
|
# SETUP LOGROTATE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -85,14 +85,12 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring the PostgreSQL database..."
|
ynh_script_progression --message="Restoring the PostgreSQL database..."
|
||||||
|
|
||||||
ynh_psql_restore_all_app_dbs_dumps --db_user=$db_user --db_user_pwd=db_user_pwd
|
ynh_psql_restore_all_app_dbs_dumps --db_user=$db_user --db_user_pwd=$db_user_pwd
|
||||||
|
|
||||||
# Give permission to db_user to create databases, as with version 9025 at least, standard Noalyss operation (can be tweaked with shared server install process - with potentially less features?) will require to create several databases: one admin database (account_repository), one database per accounting template (two are populated at install by default: mod1, mod2, etc.), one per accounting folder that will be created while using the app, etc.
|
# Give permission to db_user to create databases, as with version 9025 at least, standard Noalyss operation (can be tweaked with shared server install process - with potentially less features?) will require to create several databases: one admin database (account_repository), one database per accounting template (two are populated at install by default: mod1, mod2, etc.), one per accounting folder that will be created while using the app, etc.
|
||||||
if [ -n "$db_user" ]; then
|
if [ -n "$db_user" ]; then
|
||||||
sql="ALTER USER $db_user CREATEDB"
|
sql="ALTER USER $db_user CREATEDB"
|
||||||
ynh_psql_execute_as_root --sql="$sql"
|
ynh_psql_execute_as_root --sql="$sql"
|
||||||
sql="ALTER USER noalyss WITH PASSWORD '$db_user_pwd'" #Workaround to restore the backed up password, since as of 23 January 2023, there seems to be a bug in ynh_psql_setup_db() helper (YNH Core) forcing password reset.
|
|
||||||
ynh_psql_execute_as_root --sql="$sql"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue