From 42deb5098c9bceadc52dc12f18a722ec3517ebeb Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 13 Apr 2019 16:48:58 +0200 Subject: [PATCH] reorder INSTALL DEPENDENCIES --- scripts/install | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/install b/scripts/install index 0278f49..01285a1 100644 --- a/scripts/install +++ b/scripts/install @@ -84,6 +84,21 @@ fi ynh_exec_warn_less yunohost firewall allow --no-upnp TCP $SYNCPORT ynh_app_setting_set $app syncport $SYNCPORT +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_print_info "Installing dependencies..." + +# Download and install syncthing binary +sudo apt-get install curl +## Add the release PGP keys: +curl -s https://syncthing.net/release-key.txt | sudo apt-key add - +## Add the choosed channel to your APT sources: +echo "deb http://apt.syncthing.net/ syncthing $channel" | sudo tee /etc/apt/sources.list.d/syncthing.list +## Update and install syncthing: +sudo apt-get update -qq +sudo apt-get install syncthing -y --force-yes + #================================================= # CREATE DEDICATED USER #================================================= @@ -102,21 +117,6 @@ sudo chown -R $SYNCUSER:$SYNCUSER $SYNCHOME/ sudo find $SYNCHOME/ -type f | while read LINE; do sudo chmod 640 "$LINE" ; done sudo find $SYNCHOME/ -type d | while read LINE; do sudo chmod 750 "$LINE" ; done -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_print_info "Installing dependencies..." - -# Download and install syncthing binary -sudo apt-get install curl -## Add the release PGP keys: -curl -s https://syncthing.net/release-key.txt | sudo apt-key add - -## Add the choosed channel to your APT sources: -echo "deb http://apt.syncthing.net/ syncthing $channel" | sudo tee /etc/apt/sources.list.d/syncthing.list -## Update and install syncthing: -sudo apt-get update -qq -sudo apt-get install syncthing -y --force-yes - #================================================= # SETUP SYSTEMD #=================================================