diff --git a/scripts/install b/scripts/install index 01285a1..8318895 100644 --- a/scripts/install +++ b/scripts/install @@ -99,6 +99,16 @@ echo "deb http://apt.syncthing.net/ syncthing $channel" | sudo tee /etc/apt/sour sudo apt-get update -qq sudo apt-get install syncthing -y --force-yes +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_print_info "Configuring nginx web server..." + +# Configure Nginx +sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf +sed -i "s@PORTTOCHANGE@$GUIPORT@g" ../conf/nginx.conf +sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/syncthing.conf + #================================================= # CREATE DEDICATED USER #================================================= @@ -141,16 +151,6 @@ if [ -d "/etc/logrotate.d" ]; then sudo chmod 0644 /etc/logrotate.d/syncthing fi -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_print_info "Configuring nginx web server..." - -# Configure Nginx -sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf -sed -i "s@PORTTOCHANGE@$GUIPORT@g" ../conf/nginx.conf -sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/syncthing.conf - #================================================= # GENERIC FINALIZATION #=================================================