Files
main/multimedia/stream/mpd/comar/service.py
T
2020-12-13 08:50:58 +00:00

30 lines
476 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/python
# -*- coding: utf-8 -*-
serviceType = "server"
serviceDesc = \
\
_({"en": "Music Player Daemon",
"tr": "Müzik Çalıcı Sunucusu"})
from comar.service import *
import re
import os
PIDFILE = "/run/mpd/mpd.pid"
@synchronized
def start():
startService(command="/usr/bin/mpd",
args="/etc/mpd.conf",
pidfile=PIDFILE,
donotify=True)
@synchronized
def stop():
stopService(PIDFILE,
donotify=True)
def status():
return isServiceRunning(PIDFILE)