mirror of
https://github.com/YunoHost-Apps/timeoff_ynh.git
synced 2024-09-03 20:35:59 +02:00
Fix
This commit is contained in:
parent
d698de9cbd
commit
4408342fff
3 changed files with 29 additions and 14 deletions
|
@ -1,12 +1,12 @@
|
||||||
/*{
|
{
|
||||||
"production": {
|
"production": {
|
||||||
"dialect": "sqlite",
|
"dialect": "sqlite",
|
||||||
"storage": "./db.production.sqlite",
|
"storage": "./db.production.sqlite",
|
||||||
"logging": false
|
"logging": false
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
{
|
/*{
|
||||||
"production": {
|
"production": {
|
||||||
"username": "__DB_NAME__",
|
"username": "__DB_NAME__",
|
||||||
"password": "__DB_PWD__",
|
"password": "__DB_PWD__",
|
||||||
|
@ -14,4 +14,4 @@
|
||||||
"host": "127.0.0.1",
|
"host": "127.0.0.1",
|
||||||
"dialect": "mysql"
|
"dialect": "mysql"
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
|
@ -63,6 +63,13 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing dependencies..."
|
ynh_script_progression --message="Installing dependencies..."
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# INSTALL DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Installing dependencies..."
|
||||||
|
|
||||||
# Install Nodejs
|
# Install Nodejs
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
|
@ -77,12 +84,12 @@ ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A MYSQL DATABASE
|
# CREATE A MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Creating a MySQL database..."
|
# ynh_script_progression --message="Creating a MySQL database..."
|
||||||
|
|
||||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
# db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||||
db_user=$db_name
|
# db_user=$db_name
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$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
|
# ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
|
|
@ -18,8 +18,8 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
#db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
db_user=$db_name
|
#db_user=$db_name
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -46,10 +46,18 @@ ynh_remove_systemd_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE THE MYSQL DATABASE
|
# REMOVE THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Removing the MySQL database..."
|
# ynh_script_progression --message="Removing the MySQL database..."
|
||||||
|
|
||||||
# Remove a database if it exists, along with the associated user
|
# # Remove a database if it exists, along with the associated user
|
||||||
ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
# ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# REMOVE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing dependencies..."
|
||||||
|
|
||||||
|
# Remove metapackage and its dependencies
|
||||||
|
ynh_remove_app_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE DEPENDENCIES
|
# REMOVE DEPENDENCIES
|
||||||
|
|
Loading…
Reference in a new issue