diff --git a/check_process b/check_process index 12a8c93..b50e3a6 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,7 @@ upgrade=1 #upgrade=1 from_commit=CommitHash backup_restore=1 - multi_instance=0 + multi_instance=1 change_url=1 ;;; Options Email= diff --git a/conf/.env b/conf/.env index 96cc833..c1c23dd 100644 --- a/conf/.env +++ b/conf/.env @@ -1,3 +1,5 @@ -SHIORI_DBTYPE=mysql -SHIORI_DSN=__DB_USER__:__DB_PWD__@(localhost)/__DB_NAME__?charset=utf8&parseTime=True&loc=Local -SHIORI_DIR=__DATADIR__ \ No newline at end of file +SHIORI_DBMS=mysql +SHIORI_MYSQL_USER=__DB_USER__ +SHIORI_MYSQL_PASS=__DB_PWD__ +SHIORI_MYSQL_NAME=__DB_NAME__ +SHIORI_MYSQL_ADDRESS=127.0.0.1:3306 \ No newline at end of file diff --git a/manifest.json b/manifest.json index dbeda44..9e93395 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "packaging_format": 1, "description": { "en": "Simple bookmark manager built with Go", - "fr": "Simple bookmark manager built with Go" + "fr": "Gestionnaire de liens simple construit avec Go" }, "version": "1.5.0~ynh1", "url": "https://github.com/go-shiori/shiori", @@ -24,7 +24,7 @@ "requirements": { "yunohost": ">= 4.3.0" }, - "multi_instance": false, + "multi_instance": true, "services": [ "nginx" ], diff --git a/scripts/backup b/scripts/backup index cd58e10..cbcef80 100755 --- a/scripts/backup +++ b/scripts/backup @@ -27,7 +27,6 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -40,12 +39,6 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$final_path" -#================================================= -# BACKUP THE DATA DIR -#================================================= - -ynh_backup --src_path="$datadir" --is_big - #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= diff --git a/scripts/change_url b/scripts/change_url index 19a3176..e2a9cb6 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -69,7 +69,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF diff --git a/scripts/install b/scripts/install index 838626a..ad2bd8e 100755 --- a/scripts/install +++ b/scripts/install @@ -96,20 +96,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# CREATE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Creating a data directory..." --weight=1 - -datadir=/home/yunohost.app/$app -ynh_app_setting_set --app=$app --key=datadir --value=$datadir - -mkdir -p $datadir - -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" - #================================================= # ADD A CONFIGURATION #================================================= diff --git a/scripts/remove b/scripts/remove index 11ae555..2a50a54 100755 --- a/scripts/remove +++ b/scripts/remove @@ -20,7 +20,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) 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) -datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # STANDARD REMOVE @@ -69,14 +68,6 @@ ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="$final_path" -#================================================= -# REMOVE APP MAIN DIR -#================================================= -ynh_script_progression --message="Removing dir directory..." --weight=1 - -# Remove the app directory securely -ynh_secure_remove --file="$datadir" - #================================================= # REMOVE NGINX CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index 5babc5a..33835b4 100755 --- a/scripts/restore +++ b/scripts/restore @@ -29,7 +29,6 @@ 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 -datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -67,19 +66,6 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" chmod +x "$final_path/shiori" -#================================================= -# RESTORE THE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Restoring the data directory..." --weight=1 - -ynh_restore_file --origin_path="$datadir" --not_mandatory - -mkdir -p $datadir - -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" - #================================================= # RESTORE THE MYSQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index d2cf23c..9e72e70 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,7 +49,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # CREATE DEDICATED USER