1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rsshub_ynh.git synced 2024-09-03 20:25:52 +02:00
This commit is contained in:
Éric Gaspar 2023-10-05 17:07:15 +02:00
parent 227205591e
commit 060b53ed23
5 changed files with 9 additions and 43 deletions

View file

@ -4,17 +4,16 @@ packaging_format = 2
id = "rsshub" id = "rsshub"
name = "RSSHub" name = "RSSHub"
description.en = "Explain in *a few (10~15) words* the purpose of the app or what it actually does (it is meant to give a rough idea to users browsing a catalog of 100+ apps)" description.en = "Extensible RSS feed aggregator"
description.fr = "Expliquez en *quelques* (10~15) mots l'utilité de l'app ou ce qu'elle fait (l'objectif est de donner une idée grossière pour des utilisateurs qui naviguent dans un catalogue de 100+ apps)" description.fr = "Agrégateur de flux RSS extensible"
version = "1.0~ynh1" version = "2023.10.05~ynh1"
maintainers = ["johndoe"] maintainers = ["eric_G"]
[upstream] [upstream]
license = "MIT" license = "MIT"
website = "https://example.com" website = "https://docs.rsshub.app/"
demo = "https://demo.example.com"
admindoc = "https://docs.rsshub.app/install/" admindoc = "https://docs.rsshub.app/install/"
code = "https://github.com/DIYgod/RSSHub" code = "https://github.com/DIYgod/RSSHub"
@ -52,8 +51,6 @@ ram.runtime = "50M"
[resources.install_dir] [resources.install_dir]
#[resources.data_dir]
[resources.permissions] [resources.permissions]
main.url = "/" main.url = "/"

View file

@ -21,13 +21,6 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir" ynh_backup --src_path="$install_dir"
#=================================================
# BACKUP THE DATA DIR
#=================================================
# Only relevant if there is a "data_dir" resource for this app
ynh_backup --src_path="$data_dir" --is_big
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # BACKUP THE NGINX CONFIGURATION
#================================================= #=================================================
@ -40,13 +33,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
# BACKUP THE MYSQL DATABASE
#=================================================
ynh_print_info --message="Backing up the MySQL database..."
ynh_mysql_dump_db --database="$db_name" > db.sql
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -19,23 +19,6 @@ ynh_restore_file --origin_path="$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
ynh_script_progression --message="Restoring the data directory..." --weight=1
ynh_restore_file --origin_path="$data_dir" --not_mandatory
# (Same as for install dir)
chown -R $app:www-data "$data_dir"
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================
ynh_script_progression --message="Restoring the MySQL database..." --weight=1
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#================================================= #=================================================
# REINSTALL DEPENDENCIES # REINSTALL DEPENDENCIES
#================================================= #=================================================

View file

@ -50,12 +50,12 @@ yunohost service add $app --description="A short description of the app" --log="
#================================================= #=================================================
# UPDATE A CONFIG FILE # UPDATE A CONFIG FILE
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1 #ynh_script_progression --message="Updating a configuration file..." --weight=1
ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file" #ynh_add_config --template="some_config_file" --destination="$install_dir/some_config_file"
chmod 400 "$install_dir/some_config_file" #chmod 400 "$install_dir/some_config_file"
chown $app:$app "$install_dir/some_config_file" #chown $app:$app "$install_dir/some_config_file"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE