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]
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