Browse Source

merging

main
Zen 3 years ago
parent
commit
54e57de35e
  1. 5
      ingredients/copper
  2. 5
      ingredients/gold
  3. 5
      ingredients/iron
  4. 5
      ingredients/tin
  5. 100
      recipes/ao.sh

5
ingredients/copper

@ -11,6 +11,11 @@
# This ingredient is focused around scripts that make it easier to # This ingredient is focused around scripts that make it easier to
# interact with and create new networks on your system. # interact with and create new networks on your system.
# Start with lead...
if [ -z "$LEAD" ]; then
. ingredients/lead
fi
locate_torrc() { locate_torrc() {
if [ -n $TORRCPATH ]; then if [ -n $TORRCPATH ]; then
if [ -f $HOME/.tor/torrc ]; then if [ -f $HOME/.tor/torrc ]; then

5
ingredients/gold

@ -12,6 +12,11 @@
# This ingredient is to be used whenever a recipe requires use of # This ingredient is to be used whenever a recipe requires use of
# the Bitcoin ecosystem # the Bitcoin ecosystem
# Start with lead...
if [ -z "$LEAD" ]; then
. ingredients/lead
fi
install_bitcoin() { install_bitcoin() {
say "${BOLD}Installing Bitcoin Core${RESET}" say "${BOLD}Installing Bitcoin Core${RESET}"

5
ingredients/iron

@ -13,6 +13,11 @@
# running them from your server. Expect to use this one a lot if you're # running them from your server. Expect to use this one a lot if you're
# writing alchemy recipes! # writing alchemy recipes!
# Start with lead...
if [ -z "$LEAD" ]; then
. ingredients/lead
fi
# ------------------- Databases ------------------- # ------------------- Databases -------------------
install_database() { install_database() {

5
ingredients/tin

@ -11,6 +11,11 @@
# This ingredient is to be used when you're interacting with physical # This ingredient is to be used when you're interacting with physical
# hardware like GPIO pins or USB drives # hardware like GPIO pins or USB drives
# Start with lead...
if [ -z "$LEAD" ]; then
. ingredients/lead
fi
sha256_check() { sha256_check() {
# Args: <sha256_hash> <filename> # Args: <sha256_hash> <filename>
# #

100
recipes/ao.sh

@ -37,31 +37,26 @@ if ! id -u > /dev/null; then
exit 1 exit 1
fi fi
# TODO: dependencies should not be frontloaded, they should be installed as needed # TODO: dependencies should not be frontloaded, they should be installed as needed
say "Making sure we've got the basics..." say "Making sure we've got the basics..."
say "(you'll probably need to input ${BLUE}your 'sudo' password${RESET} here)" say "(you'll probably need to input ${BLUE}your 'sudo' password${RESET} here)"
case $DISTRO in case $DISTRO in
"debian") "debian")
# Note -- I'm not sure if these are all needed but I'm not in the mood to check # 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 \ 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
libgmp-dev libsqlite3-dev python python3 python3-mako libsodium-dev build-essential pkg-config libev-dev \
libcurl4-gnutls-dev libssl-dev fakeroot devscripts
;; ;;
"arch") "arch")
if ! pacman -Qg base-devel; then if ! pacman -Qg base-devel; then
sudo pacman -S base-devel --noconfirm sudo pacman -S base-devel --noconfirm
fi fi
install_if_needed wget python gmp sqlite3 autoconf-archive pkgconf libev \ install_if_needed wget python gmp sqlite3 autoconf-archive pkgconf libev python-mako python-pip net-tools zlib libsodium gettext nginx
python-mako python-pip net-tools zlib libsodium gettext nginx
;; ;;
"mac") "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") "fedora")
install_if_needed git wget tor sqlite3 autoconf autoconf-archive automake \ install_if_needed git wget tor sqlite3 autoconf autoconf-archive automake python python3 python3-mako pkg-config fakeroot devscripts
python python3 python3-mako pkg-config fakeroot devscripts
;; ;;
"*") "*")
if [ -z "$DISTRO" ]; then if [ -z "$DISTRO" ]; then
@ -263,7 +258,7 @@ esac
READY='' 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." 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} " ask_for ready "${BLUE}You ready? (y/n):${RESET} "
say "" say ""
say "" say ""
@ -301,7 +296,7 @@ say ""
build_service_from_template ao "AO=$AO" "NODE_PARAMS=$NODE_PARAMS" "NODE=`which node`" build_service_from_template ao "AO=$AO" "NODE_PARAMS=$NODE_PARAMS" "NODE=`which node`"
activate_service ao activate_service ao
say "this should be nginx" say ""
activate_service nginx activate_service nginx
# ------------------- Step 8 - Port Testing ------------------- # ------------------- Step 8 - Port Testing -------------------
@ -313,47 +308,50 @@ check_ports
# ------------------- Step 9 - Health Check ------------------- # ------------------- Step 9 - Health Check -------------------
say '*********************************************************' say '*********************************************************'
say "* ${BOLD}Version Information${RESET} *" say "* ${BOLD}Version Information${RESET} *"
say '*********************************************************' say '*********************************************************'
say ' ' say ' '
say 'make Version' say 'make Version'
say '*********************************************************' say '*********************************************************'
make --version make --version
say ' ' say ' '
say 'node Version' say 'node Version'
say '*********************************************************' say '*********************************************************'
node --version node --version
say ' ' say ' '
say 'sqlite3 Version' say 'sqlite3 Version'
say '*********************************************************' say '*********************************************************'
sqlite3 --version sqlite3 --version
say ' ' say ' '
say 'tor Version' say 'tor Version'
say '*********************************************************' say '*********************************************************'
tor --version tor --version
say ' ' say ' '
say 'bitcoind Version' say 'bitcoind Version'
say '*********************************************************' say '*********************************************************'
bitcoind --version bitcoind --version
say ' ' say ' '
say 'lightningd Version' say 'lightningd Version'
say '*********************************************************' say '*********************************************************'
lightningd --version lightningd --version
say ' ' say ' '
say 'clboss Version' say 'clboss Version'
say '*********************************************************' say '*********************************************************'
clboss --version 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 ""
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!" say "The default login is ${BLUE}dctrl/dctrl${RESET}, have fun!"
exit 0 exit 0

Loading…
Cancel
Save