snmpd.py 618 B

123456789101112131415161718192021222324
  1. # -*- coding: utf-8 -*-
  2. from comar.service import *
  3. serviceType = "server"
  4. serviceDesc = _({"en": "Simple Network Management Protocol (SNMP) Daemon",
  5. "tr": "Simple Network Management Protocol (SNMP) Servisi"})
  6. serviceConf = "snmpd"
  7. pidfile = "/run/snmpd.pid"
  8. @synchronized
  9. def start():
  10. startService(command="/usr/sbin/snmpd",
  11. args="-p %s %s" % (pidfile, config.get("SNMPD_FLAGS", "")),
  12. pidfile=pidfile,
  13. donotify=True)
  14. @synchronized
  15. def stop():
  16. stopService(pidfile=pidfile, donotify=True)
  17. def status():
  18. return isServiceRunning(pidfile)