#!/usr/bin/env python3
"""trustmuxd — Trustmux daemon."""
import sys
import os

# When run from the dev tree, the package is in a sibling trustmux/ dir.
# When installed by autotools, fall back to the configure-time trustmuxpydir.
_here = os.path.dirname(os.path.abspath(__file__))
if os.path.isdir(os.path.join(_here, "trustmux")):
    sys.path.insert(0, _here)
else:
    sys.path.insert(0, "@trustmuxpydir@")

from trustmux._daemon import main

if __name__ == "__main__":
    main()
