summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-10-27 15:11:37 +0100
committerChristian Grothoff <christian@grothoff.org>2020-10-27 15:11:37 +0100
commit607bd2ab8b237a1a589df58ca3207f0b51443a5f (patch)
treea0a3bc2aeddfd76a87e2221e65a1f8ad2c47280a
parent8dae8856d1a265ba88f0efb8d94b95c63cf9c76e (diff)
downloadwoocommerce-taler-607bd2ab8b237a1a589df58ca3207f0b51443a5f.tar.gz
woocommerce-taler-607bd2ab8b237a1a589df58ca3207f0b51443a5f.tar.bz2
woocommerce-taler-607bd2ab8b237a1a589df58ca3207f0b51443a5f.zip
separate reclaim install
-rwxr-xr-xserver-build/QEMU-autobuild/buildReclaim.sh9
-rw-r--r--server-build/my-simple-cdd/README14
-rwxr-xr-xserver-build/my-simple-cdd/profiles/wootaler.postinst2
3 files changed, 22 insertions, 3 deletions
diff --git a/server-build/QEMU-autobuild/buildReclaim.sh b/server-build/QEMU-autobuild/buildReclaim.sh
index 131c0d9..961b974 100755
--- a/server-build/QEMU-autobuild/buildReclaim.sh
+++ b/server-build/QEMU-autobuild/buildReclaim.sh
@@ -93,22 +93,28 @@ echo "Setting up systemd integration"
sudo -u reclaim cat - > /etc/systemd/system/reclaim.service <<EOF
[Unit]
Description = GNUnet for reclaim
+After=network.target
[Service]
Type=simple
User=reclaim
ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm
WorkingDirectory=/home/reclaim
+[Install]
+WantedBy=multi-user.target
EOF
sudo -u gnunet cat - > /etc/systemd/system/gnunet.service <<EOF
[Unit]
Description = GNUnet main service
+After=network.target
[Service]
Type=simple
User=gnunet
ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf
WorkingDirectory=/home/gnunet
-EOF
+[Install]
+WantedBy=multi-user.target
+ EOF
echo "Reloading systemd configuration"
systemctl daemon-reload
@@ -134,6 +140,7 @@ sudo -u reclaim gnunet-namestore -a -z "$SHOP_ZONE" -n @ -t RECLAIM_OIDC_REDIREC
# Tell reclaim the name of the shop that asks for permissions (to be shown to the user)
sudo -u reclaim gnunet-namestore -a -z "$SHOP_ZONE" -n @ -t RECLAIM_OIDC_CLIENT -V "$SHOP_NAME" -e 1h -p
+echo "Setting up Reclaim as OIDC provider"
# Setup ReClaim as OIDC provider with WooCommerce
cd /var/www/wordpress
diff --git a/server-build/my-simple-cdd/README b/server-build/my-simple-cdd/README
index 7749add..0005f13 100644
--- a/server-build/my-simple-cdd/README
+++ b/server-build/my-simple-cdd/README
@@ -39,7 +39,8 @@ will fail):
$ sudo echo 1 > /proc/sys/net/ipv4/ip_forward
$ sudo iptables -t nat -A POSTROUTING -o wlp3s0 -j MASQUERADE
-Finally, boot the final image using:
+
+Next, boot the final image using:
$ ./run-system.sh
@@ -61,3 +62,14 @@ should be able to simply re-run it using:
(it will also re-run on each boot until it has
succeeded).
+
+
+Now, open "https://localhost:9999/" in a browser (you can do so in the
+guest or the host). Go into the WooCommerce configuration for the OIDC
+plugin, and click "safe" (no need to actually change options).
+
+Then, finally, run:
+
+# deploy-reclaim.sh
+
+as root inside the VM.
diff --git a/server-build/my-simple-cdd/profiles/wootaler.postinst b/server-build/my-simple-cdd/profiles/wootaler.postinst
index 8887fb9..279f224 100755
--- a/server-build/my-simple-cdd/profiles/wootaler.postinst
+++ b/server-build/my-simple-cdd/profiles/wootaler.postinst
@@ -44,7 +44,7 @@ yes | tr y '\n' | woocommerce-taler/server-build/QEMU-autobuild/buildWooTalerSer
yes | tr y '\n' | woocommerce-taler/server-build/QEMU-autobuild/buildWebstore.sh
-yes | tr y '\n' | woocommerce-taler/server-build/QEMU-autobuild/buildReclaim.sh
+cp woocommerce-taler/server-build/QEMU-autobuild/buildReclaim.sh /usr/local/bin/deploy-reclaim.sh
# Remove self from boot sequence
rm /etc/systemd/system/firstboot-wootaler.service