Fix config file installation path in PKGBUILD and update main application to load config from new path

This commit is contained in:
Edgar P. Burkhart 2025-03-09 11:27:57 +01:00
parent 0d23d6ef56
commit 2042c413c7
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 2 additions and 2 deletions

View file

@ -53,6 +53,6 @@ package() {
cd "$srcdir/${pkgname%-git}"
python -m installer --destdir="${pkgdir}" dist/*.whl
install -Dm644 config.example.toml "${pkgdir}/etc/${pkgname}/config.toml"
install -Dm644 config.example.toml "${pkgdir}/etc/${pkgname%-git}/config.toml"
install -Dm644 ${pkgname%-git}.service "${pkgdir}/usr/lib/systemd/system/${pkgname%-git}.service"
}

View file

@ -7,7 +7,7 @@ from hasspy.mqtt import HassClient
def main() -> None:
logging.basicConfig(level=logging.INFO)
with open("/etc/config.toml", "rb") as file:
with open("/etc/hasspy/config.toml", "rb") as file:
config = tomllib.load(file)
ha = HassClient(