vnstat adding service daemon
This commit is contained in:
@@ -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)
|
||||
@@ -27,6 +27,9 @@
|
||||
<Files>
|
||||
<Path fileType="all">/</Path>
|
||||
</Files>
|
||||
<Provides>
|
||||
<COMAR script="vnstatd.py">System.Service</COMAR>
|
||||
</Provides>
|
||||
</Package>
|
||||
<History>
|
||||
<Update release="1">
|
||||
@@ -37,4 +40,4 @@
|
||||
<Email>alicengizkurt@gmail.com</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
</PISI>
|
||||
|
||||
Reference in New Issue
Block a user