You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/debian/patches/0004-Make-root-bootstraps-t...

34 lines
952 B
Diff

From: Jason Rhinelander <jason@imaginary.ca>
Date: Wed, 4 Sep 2019 15:50:06 -0300
Subject: Make root bootstraps to system path
---
lokinet-bootstrap | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lokinet-bootstrap b/lokinet-bootstrap
index 683173b..1536007 100755
--- a/lokinet-bootstrap
+++ b/lokinet-bootstrap
@@ -13,6 +13,10 @@ default_mainnet=https://seed.lokinet.org/lokinet.signed
default_testnet=https://seed.lokinet.org/testnet.signed
default_dest="$HOME/.lokinet/bootstrap.signed"
+if [ "$UID" == 0 ]; then
+ default_dest=/var/lib/lokinet/bootstrap.signed
+fi
+
if [ "$#" -gt 2 ]; then
helpme=y
fi
@@ -21,6 +25,9 @@ if [ -z "$1" ] || [ "$1" == "mainnet" ] || [ "$1" == "lokinet" ]; then
url="${default_mainnet}"
elif [ "$1" == "testnet" ]; then
url="${default_testnet}"
+ if [ "$UID" == "0" ]; then
+ default_dest=/var/lib/lokinet/testnet/bootstrap.signed
+ fi
elif [[ "$1" = -* ]]; then
helpme=y
else