Fix config file installation path in PKGBUILD and update main application to load config from new path
This commit is contained in:
parent
0d23d6ef56
commit
2042c413c7
2 changed files with 2 additions and 2 deletions
2
PKGBUILD
2
PKGBUILD
|
@ -53,6 +53,6 @@ package() {
|
||||||
cd "$srcdir/${pkgname%-git}"
|
cd "$srcdir/${pkgname%-git}"
|
||||||
|
|
||||||
python -m installer --destdir="${pkgdir}" dist/*.whl
|
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"
|
install -Dm644 ${pkgname%-git}.service "${pkgdir}/usr/lib/systemd/system/${pkgname%-git}.service"
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ from hasspy.mqtt import HassClient
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
logging.basicConfig(level=logging.INFO)
|
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)
|
config = tomllib.load(file)
|
||||||
|
|
||||||
ha = HassClient(
|
ha = HassClient(
|
||||||
|
|
Loading…
Add table
Reference in a new issue