home · contact · privacy
Fix microblog.pub setup.
[config] / bullseye / setup_scripts / setup_microblogpub.sh
index 2c057af13d316d553eb6bfc57ab7946b4f5c2222..ce0d7d1c6c1bbb8db811cc34625754b18cec43be 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 --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
 service microblogpub start