apache, subversion and deps in main

This commit is contained in:
Ertuğrul Erata
2015-09-05 00:01:04 +03:00
parent bfa8722fab
commit 31c7749ca4
54 changed files with 3883 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
#!/usr/bin/python
import os
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
os.system("/bin/chown root:apache /usr/sbin/suexec")
os.system("/bin/chmod 04710 /usr/sbin/suexec")
os.system("/bin/chown apache:apache /var/cache/apache2")
+35
View File
@@ -0,0 +1,35 @@
from comar.service import *
serviceType = "server"
serviceDesc = _({"en": "Apache Web Server",
"tr": "Apache Web Sunucusu"})
serviceConf = "apache2"
PIDFILE = "/run/apache2.pid"
@synchronized
def start():
import os
os.environ["LC_ALL"] = "C"
os.environ["LANG"] = "C"
startService(command="/usr/sbin/apache2",
args="-d /usr/lib/apache2/ -f /etc/apache2/httpd.conf %s -k start" % config.get("APACHE2_OPTS", ""),
pidfile=PIDFILE,
donotify=True)
@synchronized
def stop():
stopService(command="/usr/sbin/apache2",
args="-d /usr/lib/apache2/ -f /etc/apache2/httpd.conf %s -k stop" % config.get("APACHE2_OPTS", ""),
donotify=True)
import time
time.sleep(3)
def reload():
stopService(command="/usr/sbin/apache2",
args="-d /usr/lib/apache2/ -f /etc/apache2/httpd.conf %s -k graceful" % config.get("APACHE2_OPTS", ""))
def status():
return isServiceRunning(PIDFILE)