create core package
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
import os
|
||||
import os.path
|
||||
|
||||
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
os.system("/bin/chown -R root:cron /var/spool/cron")
|
||||
os.system("/bin/chmod -R 01730 /var/spool/cron")
|
||||
|
||||
os.system("/bin/chmod 0755 /etc/conf.d")
|
||||
|
||||
os.system("/bin/chmod 0644 /etc/pam.d/cron")
|
||||
|
||||
os.system("/bin/chown root:wheel /usr/sbin/cron")
|
||||
os.system("/bin/chmod 0750 /usr/sbin/cron")
|
||||
|
||||
os.system("/bin/chown root:cron /usr/bin/crontab")
|
||||
os.system("/bin/chmod 02755 /usr/bin/crontab")
|
||||
|
||||
crontabs = "/var/spool/cron/crontabs"
|
||||
for user in os.listdir(crontabs):
|
||||
os.system("/bin/chown %s:cron %s" % (user, os.path.join(crontabs, user)))
|
||||
os.system("/bin/chmod 0600 %s" % os.path.join(crontabs, user))
|
||||
@@ -0,0 +1,20 @@
|
||||
from comar.service import *
|
||||
|
||||
serviceType = "local"
|
||||
serviceDesc = _({"en": "Cron Task Scheduler",
|
||||
"tr": "Cron Görev Zamanlayıcı"})
|
||||
serviceDefault = "on"
|
||||
|
||||
@synchronized
|
||||
def start():
|
||||
startService(command="/usr/sbin/cron",
|
||||
pidfile="/var/run/cron.pid",
|
||||
donotify=True)
|
||||
|
||||
@synchronized
|
||||
def stop():
|
||||
stopService(pidfile="/var/run/cron.pid",
|
||||
donotify=True)
|
||||
|
||||
def status():
|
||||
return isServiceRunning("/var/run/cron.pid")
|
||||
Reference in New Issue
Block a user