我想在Linux中创建一个systemd服务模块,这样我就不必在系统启动时输入命令:
cd /etc/mautrix-facebook/venv
source bin/activate
python3 -m mautrix_facebook
mautrix-facebook.service:
[Unit]
Description=Matrix-Facebook bridge
[Service]
WorkingDirectory=~
ExecStart=/etc/mautrix-facebook/venv/bin/python3 -m mautrix_facebook
User=alex
Restart=always
[Install]
WantedBy=multi-user.target
该模块尝试在 /etc/mautrix-facebook/venv/bin 中启动,我收到如下错误:
FileNotFoundError: [Errno 2] No such file or directory: 'config.yaml'
如何让模块在 /etc/mautrix-facebook/venv 中运行?