2018-03-21 06:10:28 -04:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
# Fenrir TTY screen reader
|
|
|
|
# By Chrys, Storm Dragon, and contributers.
|
|
|
|
|
|
|
|
import os, sys, inspect
|
|
|
|
fenrirPath = os.path.dirname(os.path.realpath(os.path.abspath(inspect.getfile(inspect.currentframe()))))
|
|
|
|
|
|
|
|
if not fenrirPath in sys.path:
|
|
|
|
sys.path.append(fenrirPath)
|
|
|
|
|
|
|
|
from fenrirscreenreader.core import fenrirManager
|
|
|
|
from daemonize import Daemonize
|
|
|
|
|
|
|
|
pidFile = "/run/fenrir.pid"
|
|
|
|
|
|
|
|
def main():
|
|
|
|
app = fenrirManager.fenrirManager()
|
|
|
|
app.proceed()
|
|
|
|
del app
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
# for debug in foreground
|
2018-05-17 16:21:50 -04:00
|
|
|
#daemon = Daemonize(app="fenrir-daemon", pid=pidFile, action=main, foreground=True,chdir=fenrirPath)
|
|
|
|
daemon = Daemonize(app="fenrir-daemon", pid=pidFile, action=main, chdir=fenrirPath)
|
2018-03-21 06:10:28 -04:00
|
|
|
daemon.start()
|
|
|
|
|