#!/usr/bin/env python3
# This file is placed in the Public Domain.
# pylint: disable=C,W0105


"service"


from nixt.persist import pidfile, pidname
from nixt.runtime import errors, forever, privileges, wrap


from nixm.command import NAME, scanner
from nixm         import face


"runtime"


def main():
    privileges()
    pidfile(pidname(NAME))
    scanner(face, init=True)
    forever()


if __name__ == "__main__":
    wrap(main)
    for txt in errors():
        print(txt)
