gdm move
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os, re
|
||||
|
||||
OUR_ID = 42
|
||||
OUR_NAME = "gdm"
|
||||
OUR_DESC = "GDM"
|
||||
|
||||
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
try:
|
||||
os.system("groupadd -g %d %s" % (OUR_ID, OUR_NAME))
|
||||
os.system("useradd -m -d /var/lib/gdm -r -s /bin/false -u %d -g %d %s -c %s" % (OUR_ID, OUR_ID, OUR_NAME, OUR_DESC))
|
||||
os.system("passwd -ql %s" % (OUR_NAME))
|
||||
|
||||
os.system("/bin/chown gdm:gdm -R /var/lib/gdm")
|
||||
os.system("/bin/chown root:gdm -R /var/log/gdm")
|
||||
except:
|
||||
pass
|
||||
|
||||
def postRemove():
|
||||
try:
|
||||
os.system("userdel %s" % OUR_NAME)
|
||||
os.system("groupdel %s" % OUR_NAME)
|
||||
except:
|
||||
pass
|
||||
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/python
|
||||
#-*- coding: UTF-8 -*-
|
||||
|
||||
from comar.service import *
|
||||
import os
|
||||
|
||||
serviceType = "server"
|
||||
serviceDesc = _({
|
||||
"en": "GNOME Desktop",
|
||||
"tr": "GNOME Masaüstü",
|
||||
})
|
||||
serviceDefault="on"
|
||||
PIDFILE="/run/gdm/gdm.pid"
|
||||
DAEMON="/usr/sbin/gdm"
|
||||
|
||||
@synchronized
|
||||
def start():
|
||||
startService(command=DAEMON,
|
||||
pidfile=PIDFILE,
|
||||
detach=True,
|
||||
donotify=True)
|
||||
|
||||
@synchronized
|
||||
def stop():
|
||||
stopService(pidfile=PIDFILE,
|
||||
donotify=True)
|
||||
|
||||
try:
|
||||
os.unlink(PIDFILE)
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
def status():
|
||||
return isServiceRunning(PIDFILE)
|
||||
Reference in New Issue
Block a user