diff --git a/neutrinet.sh b/neutrinet.sh index 75e6f9d..c0878db 100755 --- a/neutrinet.sh +++ b/neutrinet.sh @@ -318,6 +318,23 @@ install_neutrinet_ynh() { yunohost app install https://github.com/Neutrinet/neutrinet_ynh --verbose --args "domain=$domain&path=/neutrinet" } +upgrade_neutrinet_ynh() { + set -x + echo "Upgrading neutrinet_ynh..." + + yunohost app upgrade neutrinet -u https://github.com/Neutrinet/neutrinet_ynh --verbose +} + +neutrinet_connectivity_fix() { + set -x + echo "Adding the VPN connectivity fix ..." + + cd /root + wget https://gist.githubusercontent.com/tierce/ed511c2990919655d99f54672dcb3159/raw/f96ef864c9fc4bd8ada4bc34b1882c7f688fc92d/neutrinet-connectivity-fix.sh + chmod +x neutrinet-connectivity-fix.sh + echo "*/5 * * * * root /sbin/ifconfig tun0 > /dev/null 2>&1 || /root/neutrinet-connectivity-fix.sh > /dev/null 2>&1" > /etc/cron.d/restart_vpn +} + # ---------------------------------- # Optional steps # ---------------------------------- @@ -381,7 +398,6 @@ get_variables modify_hosts set_locales -upgrade_system postinstall_yunohost create_yunohost_user @@ -392,9 +408,12 @@ install_hotspot configure_hostpot install_doctorcube install_neutrinet_ynh +upgrade_neutrinet_ynh +neutrinet_connectivity_fix + +upgrade_system remove_dyndns_cron restart_api display_win_message -