1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/shiori_ynh.git synced 2024-09-03 20:26:17 +02:00
This commit is contained in:
ericgaspar 2022-01-10 15:38:24 +01:00
parent 0ae9486e44
commit b095262717
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 20 additions and 20 deletions

View file

@ -74,12 +74,12 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
#=================================================
# CREATE A MYSQL DATABASE
#=================================================
# ynh_script_progression --message="Creating a MySQL database..." --weight=2
ynh_script_progression --message="Creating a MySQL database..." --weight=2
# db_name=$(ynh_sanitize_dbid --db_name=$app)
# db_user=$db_name
# ynh_app_setting_set --app=$app --key=db_name --value=$db_name
# ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
db_name=$(ynh_sanitize_dbid --db_name=$app)
db_user=$db_name
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -158,7 +158,7 @@ yunohost service add $app --description="Simple bookmark manager" --log="/var/lo
ynh_script_progression --message="Starting a systemd service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#=================================================
# SETUP SSOWAT

View file

@ -18,8 +18,8 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
port=$(ynh_app_setting_get --app=$app --key=port)
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#db_user=$db_name
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
@ -54,10 +54,10 @@ ynh_remove_logrotate
#=================================================
# REMOVE THE MYSQL DATABASE
#=================================================
# ynh_script_progression --message="Removing the MySQL database..." --weight=1
ynh_script_progression --message="Removing the MySQL database..." --weight=1
# # Remove a database if it exists, along with the associated user
# ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
# 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

View file

@ -31,8 +31,8 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#db_user=$db_name
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name
datadir=$(ynh_app_setting_get --app=$app --key=datadir)
#=================================================
@ -96,11 +96,11 @@ ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
# ynh_script_progression --message="Restoring the MySQL database..." --weight=1
ynh_script_progression --message="Restoring the MySQL database..." --weight=1
# 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
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
#=================================================
# RESTORE SYSTEMD
@ -129,7 +129,7 @@ yunohost service add $app --description="Simple bookmark manager" --log="/var/lo
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#=================================================
# GENERIC FINALIZATION

View file

@ -19,7 +19,7 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
#=================================================
# CHECK VERSION
@ -119,7 +119,7 @@ yunohost service add $app --description="Simple bookmark manager" --log="/var/lo
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#=================================================
# RELOAD NGINX