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 22:50:47 +01:00
parent 904bba84ac
commit a82ccd4640
No known key found for this signature in database
GPG key ID: 574F281483054D44
9 changed files with 10 additions and 52 deletions

View file

@ -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=

View file

@ -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__
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

View file

@ -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"
],

View file

@ -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
#=================================================

View file

@ -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

View file

@ -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
#=================================================

View file

@ -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
#=================================================

View file

@ -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
#=================================================

View file

@ -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