#!/bin/sh set -eu ## BEGIN configuration # Where is WooCommerce? WOOHOST=http://127.0.0.1:9999 # Name of the shop for the user SHOP_NAME="WooTaler Shop" # Ego of the zone for the RP in GNS SHOP_ZONE=wootaler-shop # Which attributes does WooCommerce want from the IdP? OIDC_SCOPE="openid given_name family_name email address phone" # URL where GNUnet REST service is listening for requests GNUNET_REST="http://localhost:7776/openid/" ## END configuration # Download and install GNUnet apt install \ screen \ gcc \ make\ autoconf\ automake \ libtool\ libgcrypt20-dev\ libsqlite3-dev\ gettext\ libgnutls28-dev\ libcurl4-gnutls-dev\ libunistring-dev\ libidn2-dev\ libjansson-dev\ openssl\ pkgconf\ libltdl-dev\ zlib1g-dev\ libsodium-dev\ python3.7\ texi2html\ texinfo # This installs MHD and GNUnet to /usr, overwriting (!) # the Debian package. We do that to get some minimal # setup from Debian, and also so that IF in the future # Debian does include a sufficiently recent GNUnet # package, we can simply remove these lines: cd /root git clone git://git.gnunet.org/libmicrohttpd.git cd libmicrohttpd ./bootstrap ./configure --prefix=/usr/ make install cd /root git clone git://git.gnunet.org/gnunet.git cd gnunet ./bootstrap ./configure --prefix=/usr/ make install # Use the user 'reclaim' for the reclaim/OIDC service. echo "Setting up users gnunet and reclaim" addgroup gnunet adduser --system --disabled-password --ingroup gnunet gnunet adduser --system --disabled-password --ingroup gnunet reclaim echo "Updating GNUnet configuration" touch /etc/gnunet.conf chown gnunet:gnunet /etc/gnunet.conf sudo -u gnunet gnunet-config -c /etc/gnunet.conf -s arm -o START_USER_SERVICES -V NO sudo -u gnunet gnunet-config -c /etc/gnunet.conf -s arm -o START_SYSTEM_SERVICES -V YES echo "Setting up reclaim GNUnet peer" sudo -u reclaim gnunet-config -s arm -o START_USER_SERVICES -V YES sudo -u reclaim gnunet-config -s arm -o START_SYSTEM_SERVICES -V NO sudo -u reclaim gnunet-config -s rest -o BIND_TO -V 0.0.0.0 # Setup GNUnet REST credentials echo "Configuring GNUnet REST credentials" OIDC_CLIENT_SECRET=`uuid` sudo -u reclaim gnunet-config -s reclaim-rest-plugin -o OIDC_CLIENT_SECRET -V "$OIDC_CLIENT_SECRET" echo "Setting up systemd integration" cat - > /etc/systemd/system/reclaim.service < /etc/systemd/system/gnunet.service <