File: fenrir-daemon

package info (click to toggle)
fenrir 1.9.5-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,724 kB
  • sloc: python: 10,749; sh: 387; makefile: 12
file content (28 lines) | stat: -rwxr-xr-x 779 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/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
    #daemon = Daemonize(app="fenrir-daemon", pid=pidFile, action=main, foreground=True,chdir=fenrirPath)
    daemon = Daemonize(app="fenrir-daemon", pid=pidFile, action=main, chdir=fenrirPath)
    daemon.start()