vnstat adding service daemon

This commit is contained in:
alick01
2021-06-01 23:58:16 +03:00
parent f25046f8be
commit ef6c7492c1
2 changed files with 26 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
# -*- 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)