1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00

Merge pull request #40 from YunoHost-Apps/testing

Testing
This commit is contained in:
JimboJoe 2018-03-17 16:29:06 +01:00 committed by GitHub
commit 2687c4b3c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 7 deletions

View file

@ -59,14 +59,14 @@ ynh_app_setting_set $app port $port
# Find a free port # Find a free port
peer_port=$(ynh_find_port 51413) peer_port=$(ynh_find_port 51413)
# Open this port # Open this port
yunohost firewall allow TCP $peer_port >/dev/null 2>&1 yunohost firewall allow Both $peer_port >/dev/null 2>&1
ynh_app_setting_set $app peer_port $peer_port ynh_app_setting_set $app peer_port $peer_port
#================================================= #=================================================
# INSTALL TRANSMISSION # INSTALL TRANSMISSION
#================================================= #=================================================
ynh_package_install transmission-daemon ynh_install_app_dependencies transmission-daemon acl
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION

View file

@ -25,8 +25,7 @@ peer_port=$(ynh_app_setting_get $app peer_port)
# REMOVE TRANSMISSION-DAEMON # REMOVE TRANSMISSION-DAEMON
#================================================= #=================================================
ynh_apt purge transmission-daemon ynh_remove_app_dependencies
ynh_package_autoremove transmission-common
#================================================= #=================================================
# DISABLE SERVICE IN ADMIN PANEL # DISABLE SERVICE IN ADMIN PANEL
@ -51,7 +50,7 @@ fi
if yunohost firewall list | grep -q "\- $peer_port$" if yunohost firewall list | grep -q "\- $peer_port$"
then then
echo "Close port $peer_port" echo "Close port $peer_port"
yunohost firewall disallow TCP $peer_port 2>&1 yunohost firewall disallow Both $peer_port 2>&1
fi fi
#================================================= #=================================================

View file

@ -52,7 +52,7 @@ ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"
#================================================= #=================================================
yunohost firewall allow --no-upnp TCP $port >/dev/null 2>&1 yunohost firewall allow --no-upnp TCP $port >/dev/null 2>&1
yunohost firewall allow TCP $peer_port >/dev/null 2>&1 yunohost firewall allow Both $peer_port >/dev/null 2>&1
#================================================= #=================================================
# SPECIFIC RESTORE # SPECIFIC RESTORE
@ -60,7 +60,7 @@ yunohost firewall allow TCP $peer_port >/dev/null 2>&1
# REINSTALL TRANSMISSION # REINSTALL TRANSMISSION
#================================================= #=================================================
ynh_package_install transmission-daemon ynh_install_app_dependencies transmission-daemon acl
#================================================= #=================================================
# RESTORE TRANSMISSION CONFIGURATION # RESTORE TRANSMISSION CONFIGURATION

View file

@ -33,6 +33,9 @@ if [ -z $peer_port ]; then
ynh_app_setting_set $app peer_port $peer_port ynh_app_setting_set $app peer_port $peer_port
fi fi
# Add peer_port also on UDP.
yunohost firewall allow UDP $peer_port >/dev/null 2>&1
#================================================= #=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
@ -63,6 +66,12 @@ path_url=$(ynh_normalize_url_path $path_url)
[ "$path_url" = "/" ] || path_url=${path_url}/ [ "$path_url" = "/" ] || path_url=${path_url}/
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# INSTALL DEPENDENCIES
#=================================================
ynh_install_app_dependencies transmission-daemon acl
#================================================= #=================================================
# SPECIFIC UPGRADE # SPECIFIC UPGRADE
#================================================= #=================================================