mirror of https://github.com/oxen-io/lokinet
Merge pull request #1713 from jagerman/remove-unused-user-defines
Remove unused defaults.hpppull/1722/head
commit
ea79d1c48c
@ -1,18 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#ifndef DEFAULT_RESOLVER_US
|
||||
#define DEFAULT_RESOLVER_US "1.1.1.1"
|
||||
#endif
|
||||
#ifndef DEFAULT_RESOLVER_EU
|
||||
#define DEFAULT_RESOLVER_EU "1.1.1.1"
|
||||
#endif
|
||||
#ifndef DEFAULT_RESOLVER_AU
|
||||
#define DEFAULT_RESOLVER_AU "1.1.1.1"
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_LOKINET_USER
|
||||
#define DEFAULT_LOKINET_USER "lokinet"
|
||||
#endif
|
||||
#ifndef DEFAULT_LOKINET_GROUP
|
||||
#define DEFAULT_LOKINET_GROUP "lokinet"
|
||||
#endif
|
@ -1,65 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# this shell script will be replaced by a proper program in the future (probably)
|
||||
#
|
||||
# from https://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
set -e
|
||||
|
||||
helpme=
|
||||
default_mainnet=https://seed.lokinet.org/lokinet.signed
|
||||
default_testnet=https://seed.lokinet.org/testnet.signed
|
||||
default_dest="$HOME/.lokinet/bootstrap.signed"
|
||||
|
||||
if [ "$#" -gt 2 ]; then
|
||||
helpme=y
|
||||
fi
|
||||
|
||||
if [ -z "$1" ] || [ "$1" == "mainnet" ] || [ "$1" == "lokinet" ]; then
|
||||
url="${default_mainnet}"
|
||||
elif [ "$1" == "testnet" ]; then
|
||||
url="${default_testnet}"
|
||||
elif [[ "$1" = -* ]]; then
|
||||
helpme=y
|
||||
else
|
||||
url="$1"
|
||||
fi
|
||||
|
||||
if [[ "$2" = -* ]]; then
|
||||
helpme=y
|
||||
elif [ -n "$2" ]; then
|
||||
dest="$2"
|
||||
else
|
||||
dest="$default_dest"
|
||||
fi
|
||||
|
||||
if [ -n "$helpme" ]; then
|
||||
echo "Usage: $0 [URL [DEST]] -- download bootstrap file from URL (default: lokinet) and save to DEST (default: $default_dest)."
|
||||
echo "URL can be a full URL, or else 'lokinet' or 'testnet' to use the default lokinet/testnet seed URL. 'mainnet' can be used"
|
||||
echo "as an alias for 'lokinet'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
destdir="$(dirname $dest)"
|
||||
if [ ! -d "$destdir" ]; then
|
||||
mkdir "$destdir"
|
||||
fi
|
||||
|
||||
echo "downloading $url"
|
||||
|
||||
# use temp file to not overrwrite existing bootstrap file on fail
|
||||
#tmp=mktemp
|
||||
tmp=/tmp/bootstrap.tmp
|
||||
|
||||
# MacOS does not have wget without homebrew but does have curl
|
||||
# Rick also had indicated most BSDs have curl too
|
||||
if curl -fsSL "$url" >"$tmp"; then
|
||||
mv "$tmp" "$dest"
|
||||
echo -e "${GREEN}lokinet successfully bootstrapped${NC}"
|
||||
else
|
||||
echo -e "${RED}failed to download bootstrap from $url${NC}"
|
||||
rm -f "$tmp"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue