Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neurinet_ynh upgrade & connectivity fix #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions neutrinet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ----------------------------------
Expand Down Expand Up @@ -381,7 +398,6 @@ get_variables

modify_hosts
set_locales
upgrade_system

postinstall_yunohost
create_yunohost_user
Expand All @@ -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