diff --git a/ingredients/copper b/ingredients/copper index 1c3cb60..22b1239 100644 --- a/ingredients/copper +++ b/ingredients/copper @@ -11,6 +11,11 @@ # This ingredient is focused around scripts that make it easier to # interact with and create new networks on your system. +# Start with lead... +if [ -z "$LEAD" ]; then + . ingredients/lead +fi + locate_torrc() { if [ -n $TORRCPATH ]; then if [ -f $HOME/.tor/torrc ]; then diff --git a/ingredients/gold b/ingredients/gold index 1731e1b..ccdacfe 100644 --- a/ingredients/gold +++ b/ingredients/gold @@ -12,6 +12,11 @@ # This ingredient is to be used whenever a recipe requires use of # the Bitcoin ecosystem +# Start with lead... +if [ -z "$LEAD" ]; then + . ingredients/lead +fi + install_bitcoin() { say "${BOLD}Installing Bitcoin Core${RESET}" diff --git a/ingredients/iron b/ingredients/iron index b70f0b4..cf16c7f 100644 --- a/ingredients/iron +++ b/ingredients/iron @@ -13,6 +13,11 @@ # running them from your server. Expect to use this one a lot if you're # writing alchemy recipes! +# Start with lead... +if [ -z "$LEAD" ]; then + . ingredients/lead +fi + # ------------------- Databases ------------------- install_database() { diff --git a/ingredients/tin b/ingredients/tin index 95486c3..180b281 100644 --- a/ingredients/tin +++ b/ingredients/tin @@ -11,6 +11,11 @@ # This ingredient is to be used when you're interacting with physical # hardware like GPIO pins or USB drives +# Start with lead... +if [ -z "$LEAD" ]; then + . ingredients/lead +fi + sha256_check() { # Args: # diff --git a/recipes/ao.sh b/recipes/ao.sh index 89f6ec1..37ed190 100755 --- a/recipes/ao.sh +++ b/recipes/ao.sh @@ -37,31 +37,26 @@ if ! id -u > /dev/null; then exit 1 fi - # TODO: dependencies should not be frontloaded, they should be installed as needed say "Making sure we've got the basics..." say "(you'll probably need to input ${BLUE}your 'sudo' password${RESET} here)" case $DISTRO in "debian") # Note -- I'm not sure if these are all needed but I'm not in the mood to check - install_if_needed git wget sqlite3 zlib1g-dev libtool-bin autoconf autoconf-archive automake autotools-dev \ - libgmp-dev libsqlite3-dev python python3 python3-mako libsodium-dev build-essential pkg-config libev-dev \ - libcurl4-gnutls-dev libssl-dev fakeroot devscripts + install_if_needed git wget sqlite3 zlib1g-dev libtool-bin autoconf autoconf-archive automake autotools-dev libgmp-dev libsqlite3-dev python python3 python3-mako libsodium-dev build-essential pkg-config libev-dev libcurl4-gnutls-dev libssl-dev fakeroot devscripts ;; "arch") if ! pacman -Qg base-devel; then sudo pacman -S base-devel --noconfirm fi - install_if_needed wget python gmp sqlite3 autoconf-archive pkgconf libev \ - python-mako python-pip net-tools zlib libsodium gettext nginx + install_if_needed wget python gmp sqlite3 autoconf-archive pkgconf libev python-mako python-pip net-tools zlib libsodium gettext nginx ;; "mac") - # install_if_needed better-computer + install_if_needed wget python gmp sqlite3 autoconf-archive pkgconf libev python-mako python-pip net-tools zlib libsodium gettext nginx ;; "fedora") - install_if_needed git wget tor sqlite3 autoconf autoconf-archive automake \ - python python3 python3-mako pkg-config fakeroot devscripts + install_if_needed git wget tor sqlite3 autoconf autoconf-archive automake python python3 python3-mako pkg-config fakeroot devscripts ;; "*") if [ -z "$DISTRO" ]; then @@ -263,7 +258,7 @@ esac READY='' say "\n${BOLD}Alright, almost there!${RESET} Now we just need to set up the system daemons for Tor, Bitcoin, Lightning, and the AO so that everything opens on startup." -while [[ -z "$READY" ]]; do +while [ -z "$READY" ]; do ask_for ready "${BLUE}You ready? (y/n):${RESET} " say "" say "" @@ -301,7 +296,7 @@ say "" build_service_from_template ao "AO=$AO" "NODE_PARAMS=$NODE_PARAMS" "NODE=`which node`" activate_service ao -say "this should be nginx" +say "" activate_service nginx # ------------------- Step 8 - Port Testing ------------------- @@ -313,47 +308,50 @@ check_ports # ------------------- Step 9 - Health Check ------------------- - say '*********************************************************' - say "* ${BOLD}Version Information${RESET} *" - say '*********************************************************' - - say ' ' - say 'make Version' - say '*********************************************************' - make --version - - say ' ' - say 'node Version' - say '*********************************************************' - node --version - - say ' ' - say 'sqlite3 Version' - say '*********************************************************' - sqlite3 --version - - say ' ' - say 'tor Version' - say '*********************************************************' - tor --version - - say ' ' - say 'bitcoind Version' - say '*********************************************************' - bitcoind --version - - say ' ' - say 'lightningd Version' - say '*********************************************************' - lightningd --version - - say ' ' - say 'clboss Version' - say '*********************************************************' - clboss --version +say '*********************************************************' +say "* ${BOLD}Version Information${RESET} *" +say '*********************************************************' + +say ' ' +say 'make Version' +say '*********************************************************' +make --version + +say ' ' +say 'node Version' +say '*********************************************************' +node --version + +say ' ' +say 'sqlite3 Version' +say '*********************************************************' +sqlite3 --version + +say ' ' +say 'tor Version' +say '*********************************************************' +tor --version + +say ' ' +say 'bitcoind Version' +say '*********************************************************' +bitcoind --version + +say ' ' +say 'lightningd Version' +say '*********************************************************' +lightningd --version + +say ' ' +say 'clboss Version' +say '*********************************************************' +clboss --version +say "" +say "$BOLD\nOkay, well that's everything!${RESET}" +say "" +say "As long as everything worked properly, you should be ready to continue your journey" +say "towards autonomy by opening ${BLUE}$ACCESS_POINT${RESET} in your browser." say "" -say "$BOLD\nOkay, well that's everything!${RESET}\n\nAs long as everything worked properly, \ -you should be ready to continue your journey\ntowards autonomy by opening ${BLUE}$ACCESS_POINT${RESET} in your browser." say "The default login is ${BLUE}dctrl/dctrl${RESET}, have fun!" exit 0