Files
main/network/connection/dnscrypt-proxy/comar/service.py
T
Bahar KURT c9ad64ea40 fixup! Initial build of dnscrypt-proxy
This is what I get for not testing my own package properly.
2025-09-04 00:36:19 +03:00

35 lines
737 B
Python

# -*- coding: utf-8 -*-
from comar.service import *
import os
serviceType = "local"
serviceDesc = _({"en": "DNSCrypt-proxy client",
"tr": "DNSCrypt-proxy istemcisi"})
serviceDefault = "off"
PIDFILE="/run/dnscrypt-proxy.pid"
@synchronized
def start():
# path to executable
# creates a pid file, sets the working directory and calls the jar file
startService(command="/usr/bin/dnscrypt-proxy-comar-compat.sh",
args="",
donotify=True)
@synchronized
def stop():
stopService(pidfile=PIDFILE,
donotify=True)
try:
os.unlink(PIDFILE)
except:
pass
def ready():
start()
def status():
return isServiceRunning(pidfile=PIDFILE)