aboutsummaryrefslogtreecommitdiff
path: root/server-build/QEMU-autobuild
diff options
context:
space:
mode:
Diffstat (limited to 'server-build/QEMU-autobuild')
-rwxr-xr-xserver-build/QEMU-autobuild/buildReclaim.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/server-build/QEMU-autobuild/buildReclaim.sh b/server-build/QEMU-autobuild/buildReclaim.sh
index 2a4e1be..9b1ac15 100755
--- a/server-build/QEMU-autobuild/buildReclaim.sh
+++ b/server-build/QEMU-autobuild/buildReclaim.sh
@@ -44,8 +44,7 @@ apt install \
libsodium-dev\
python3.7\
texi2html\
- texinfo \
- gnunet
+ texinfo
# This installs MHD and GNUnet to /usr, overwriting (!)
# the Debian package. We do that to get some minimal
@@ -71,7 +70,8 @@ sudo -u gnunet gnunet-config -c /etc/gnunet.conf -s arm -o START_USER_SERVICES -
sudo -u gnunet gnunet-config -c /etc/gnunet.conf -s arm -o START_SYSTEM_SERVICES -V YES
# Use the user 'reclaim' for the reclaim/OIDC service.
-echo "Setting up user reclaim"
+echo "Setting up users gnunet and reclaim"
+adduser --system --disabled-password gnunet
adduser --system --disabled-password reclaim
echo "Setting up reclaim GNUnet peer"
@@ -98,12 +98,23 @@ ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm
WorkingDirectory=/home/reclaim
EOF
+sudo -u gnunet cat - > /etc/systemd/system/gnunet.service <<EOF
+[Unit]
+Description = GNUnet main service
+[Service]
+Type=simple
+User=gnunet
+ExecStart=/usr/lib/gnunet/libexec/gnunet-service-arm -c /etc/gnunet.conf
+WorkingDirectory=/home/gnunet
+EOF
+
echo "Reloading systemd configuration"
systemctl daemon-reload
# Restart GNUnet (system service)
-echo "Restarting gnunet service"
-systemctl restart gnunet
+echo "Enabling and starting gnunet service"
+systemctl enable gnunet
+systemctl start gnunet
echo "Enabling and starting reclaim service"
systemctl enable reclaim