1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/deluge_ynh.git synced 2024-09-03 18:25:52 +02:00
This commit is contained in:
Éric Gaspar 2023-08-06 16:14:37 +02:00
parent 07c1ca4f08
commit c9a634e096
2 changed files with 6 additions and 15 deletions

View file

@ -12,7 +12,7 @@ maintainers = ["eric_G"]
[upstream] [upstream]
license = "GPL-3.0-or-later" license = "GPL-3.0-or-later"
website = "https://dev.deluge-torrent.org/" website = "https://dev.deluge-torrent.org/"
admindoc = "https://yunohost.org/packaging_apps" admindoc = "https://deluge.readthedocs.io/en/latest/"
code = "https://git.deluge-torrent.org/deluge" code = "https://git.deluge-torrent.org/deluge"
[integration] [integration]
@ -22,7 +22,7 @@ multi_instance = false
ldap = false ldap = false
sso = false sso = false
disk = "50M" disk = "50M"
ram.build = "50M" ram.build = "100M"
ram.runtime = "50M" ram.runtime = "50M"
[install] [install]

View file

@ -19,13 +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 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
#================================================= #=================================================
# RESTORE SYSTEM CONFIGURATIONS # RESTORE SYSTEM CONFIGURATIONS
#================================================= #=================================================
@ -33,18 +26,15 @@ ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./
#================================================= #=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
# This should be a symetric version of what happens in the install script
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
ynh_restore_file --origin_path="/etc/systemd/system/${app}-web.service"
systemctl enable $app.service --quiet systemctl enable $app.service --quiet
systemctl enable ${app}-web.service --quiet
yunohost service add $app --description="Lightweight BitTorrent client" --log="/var/log/$app/$app.log" yunohost service add $app --description="Lightweight BitTorrent client" --log="/var/log/$app/$app.log"
yunohost service add ${app}-web --description=BitTorrent UI --log=/var/log/$app/$app.log
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION
@ -55,6 +45,7 @@ ynh_script_progression --message="Reloading NGINX web server and $app's service.
# Typically you only have either $app or php-fpm but not both at the same time... # Typically you only have either $app or php-fpm but not both at the same time...
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="/var/log/$app/$app.log"
ynh_systemd_action --service_name=${app}-web --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload