home · contact · privacy
Improve microblog.pub setup.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 2 Jan 2023 23:23:08 +0000 (00:23 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 2 Jan 2023 23:23:08 +0000 (00:23 +0100)
bullseye/etc_files/microblogpub/etc/systemd/system/microblogpub.service
bullseye/setup_scripts/setup_microblogpub.sh

index 7a6401408f64d9cc51ac3aed313913d059551e50..441129d0a9b11f6c8c15280c0e8cbeaa7c4d63bc 100644 (file)
@@ -6,7 +6,7 @@ Type=simple
 User=plom
 WorkingDirectory=/home/plom/testing.microblog.pub/
 ExecStart=/bin/sh -c 'poetry run supervisord -c misc/supervisord.conf -n'
-Environment=VENV_DIR=REPLACE_venv_dir_ECALPER
+Environment=VENV_DIR=/home/plom/.cache/pypoetry/virtualenvs/REPLACE_venv_dir_ECALPER
 Restart=always
 
 [Install]
index 2c057af13d316d553eb6bfc57ab7946b4f5c2222..67c7262822c29cbe97f02abdeea716dd7203a40e 100755 (executable)
@@ -41,7 +41,8 @@ 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=$( 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" - plom | grep 'Path' | head -1 | awk '{print $2}')
+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
 service microblogpub start