works for qt5-base
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import shutil
|
||||
|
||||
ownerships = {
|
||||
"/run/avahi-daemon" : "avahi:avahi",
|
||||
}
|
||||
|
||||
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
for directory,owners in ownerships.items():
|
||||
if os.path.exists(directory):
|
||||
os.system("/bin/chown %s %s" % (owners, directory))
|
||||
|
||||
if os.path.exists("/etc/localtime"):
|
||||
if not os.path.isdir("/etc/avahi/etc"):
|
||||
os.makedirs("/etc/avahi/etc")
|
||||
shutil.copy("/etc/localtime", "/etc/avahi/etc/localtime")
|
||||
@@ -0,0 +1,25 @@
|
||||
from comar.service import *
|
||||
|
||||
serviceType="server"
|
||||
serviceDesc = _({"en": "Avahi Server",
|
||||
"tr": "Avahi Hizmeti"})
|
||||
|
||||
@synchronized
|
||||
def start():
|
||||
startService(command="/usr/sbin/avahi-daemon",
|
||||
args="-D",
|
||||
donotify=True)
|
||||
|
||||
@synchronized
|
||||
def stop():
|
||||
stopService(command="/usr/sbin/avahi-daemon",
|
||||
args="-k",
|
||||
donotify=True)
|
||||
|
||||
def reload():
|
||||
stopService(command="/usr/sbin/avahi-daemon",
|
||||
args="-r",
|
||||
donotify=True)
|
||||
|
||||
def status():
|
||||
return isServiceRunning("/run/avahi-daemon/pid")
|
||||
@@ -0,0 +1,29 @@
|
||||
from comar.service import *
|
||||
import signal
|
||||
|
||||
serviceType="server"
|
||||
serviceDesc = _({"en": "Avahi DNS Configuration Daemon",
|
||||
"tr": "Avahi DNS Yapılandırma Hizmeti"})
|
||||
|
||||
PIDFILE = "/run/avahi-dnsconfd.pid"
|
||||
DAEMON = "/usr/sbin/avahi-dnsconfd"
|
||||
|
||||
@synchronized
|
||||
def start():
|
||||
startDependencies("avahi")
|
||||
startService(command=DAEMON,
|
||||
args="-D",
|
||||
donotify=True)
|
||||
|
||||
@synchronized
|
||||
def stop():
|
||||
stopService(pidfile=PIDFILE,
|
||||
donotify=True)
|
||||
|
||||
@synchronized
|
||||
def reload():
|
||||
stopService(command=DAEMON,
|
||||
signal=signal.SIGHUP)
|
||||
|
||||
def status():
|
||||
return isServiceRunning(pidfile=PIDFILE)
|
||||
Reference in New Issue
Block a user