This commit is contained in:
Bob Mottram 2017-07-02 17:48:31 +01:00
parent 08b2b1a795
commit aaf2f67f0a
1 changed files with 10 additions and 3 deletions

View File

@ -13,7 +13,7 @@
# License
# =======
#
# Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -484,12 +484,19 @@ function configure_firewall_for_syncthing {
mark_completed $FUNCNAME
}
function install_syncthing {
apt-get -yq install curl
function install_syncthing_repo {
if [ -f /etc/apt/sources.list.d/syncthing.list ]; then
return
fi
apt-get -yq install curl
curl -s https://syncthing.net/release-key.txt | apt-key add -
echo "deb http://apt.syncthing.net/ syncthing release" | tee /etc/apt/sources.list.d/syncthing.list
apt-get update
}
function install_syncthing {
install_syncthing_repo
apt-get -yq install syncthing
# This probably does need to run as root so that it can access the Sync directories