Files
main/network/monitor/vnstat/comar/vnstatd.py
T
2021-06-01 23:58:16 +03:00

23 lines
543 B
Python

# -*- coding: utf-8 -*-
from comar.service import *
serviceType = "server"
serviceDesc = _({"en": "Simple Network traffic monitor Daemon",
"tr": "Basit bir ağ trafik görüntüleme Servisi"})
serviceConf = "vnstatd"
pidfile = "/run/vnstatd.pid"
@synchronized
def start():
startService(command="/usr/sbin/vnstatd",
args="-d -p %s " % pidfile,
donotify=True)
@synchronized
def stop():
stopService(pidfile=pidfile, donotify=True)
def status():
return isServiceRunning(pidfile)