From d6379f4807bc79b8f4847638dfb596302c444155 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 3 Jan 2023 01:08:30 +0100 Subject: [PATCH] Fix microblog.pub setup. --- .../microblogpub/etc/systemd/system/microblogpub.service | 2 +- bullseye/setup_scripts/setup_microblogpub.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bullseye/etc_files/microblogpub/etc/systemd/system/microblogpub.service b/bullseye/etc_files/microblogpub/etc/systemd/system/microblogpub.service index 441129d..966e58c 100644 --- a/bullseye/etc_files/microblogpub/etc/systemd/system/microblogpub.service +++ b/bullseye/etc_files/microblogpub/etc/systemd/system/microblogpub.service @@ -5,7 +5,7 @@ Description=microblog.pub Type=simple User=plom WorkingDirectory=/home/plom/testing.microblog.pub/ -ExecStart=/bin/sh -c 'poetry run supervisord -c misc/supervisord.conf -n' +ExecStart=/bin/sh -c '/home/plom/.local/bin/poetry run supervisord -c misc/supervisord.conf -n' Environment=VENV_DIR=/home/plom/.cache/pypoetry/virtualenvs/REPLACE_venv_dir_ECALPER Restart=always diff --git a/bullseye/setup_scripts/setup_microblogpub.sh b/bullseye/setup_scripts/setup_microblogpub.sh index 67c7262..ce0d7d1 100755 --- a/bullseye/setup_scripts/setup_microblogpub.sh +++ b/bullseye/setup_scripts/setup_microblogpub.sh @@ -41,7 +41,7 @@ su -lPc "cd testing.microblog.pub && poetry run inv configuration-wizard" - plom su -lPc "cd testing.microblog.pub && poetry run inv migrate-db" - plom # Set up microblog.pub daemon service. -venv_dir_path=$( su -lPc "cd testing.microblog.pub && poetry env info" - plom | grep 'Path' | head -1 | awk '{print $2}') +venv_dir_path=$( su -lPc "cd testing.microblog.pub && poetry env info --path" - plom) venv_dir=$(basename ${venv_dir_path}) sed -i "s/REPLACE_venv_dir_ECALPER/${venv_dir}/g" /etc/systemd/system/microblogpub.service systemctl enable microblogpub.service -- 2.30.2