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