Files
main/network/monitor/net-snmp/comar/snmpd.py
T
2015-08-03 00:36:21 +03:00

24 lines
618 B
Python

# -*- coding: utf-8 -*-
from comar.service import *
serviceType = "server"
serviceDesc = _({"en": "Simple Network Management Protocol (SNMP) Daemon",
"tr": "Simple Network Management Protocol (SNMP) Servisi"})
serviceConf = "snmpd"
pidfile = "/run/snmpd.pid"
@synchronized
def start():
startService(command="/usr/sbin/snmpd",
args="-p %s %s" % (pidfile, config.get("SNMPD_FLAGS", "")),
pidfile=pidfile,
donotify=True)
@synchronized
def stop():
stopService(pidfile=pidfile, donotify=True)
def status():
return isServiceRunning(pidfile)