Files
main/server/database/mariadb/comar/service.py
T
2015-06-19 13:39:29 +03:00

33 lines
698 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.
# -*- coding: utf-8 -*-
from comar.service import *
import os
serviceType="server"
serviceDesc=_({"en": "MariaDB Database Server",
"tr": "MariaDB Veritabanı Sunucusu"})
PIDFILE="/run/mysqld/mysqld.pid"
DAEMON="/usr/bin/mysqld"
@synchronized
def start():
startService(command=DAEMON,
pidfile=PIDFILE,
detach=True,
donotify=True)
#os.system("pidof mariadb_server + /usr/bin/mysqld > /run/mysqld/mysqld.pid")
@synchronized
def stop():
stopService(pidfile=PIDFILE,
donotify=True)
try:
os.unlink(PIDFILE)
except OSError:
pass
def status():
return isServiceRunning(PIDFILE)