Initial build of dnscrypt-proxy

This commit is contained in:
Bahar KURT
2025-08-20 01:51:06 +03:00
parent 4d27e42878
commit 22d85ebc29
3 changed files with 120 additions and 0 deletions
@@ -0,0 +1,34 @@
# -*- 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",
args="--config /etc/dnscrypt-proxy/dnscrypt-proxy.toml",
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)