Commits

g...@Georglap  committed e026374

Add setup.py script.

  • Participants
  • Parent commits d5cb7f9

Comments (0)

Files changed (4)

 #
 # This file is read via execfile() by racd.
 #
-# Note: always use absolute path names where not explicitly
-#       stated otherwise.
-#
+# Note: always use absolute path names where not explicitly stated otherwise.
+
+# ------ SERVER SETTINGS -------------------------------------------------------
 
 # The filename of the socket on which the daemon listens.
-socket = "/tmp/racd.sock"
+socket = "/var/run/racd.sock"
 
 # The filename of the server's log file, or None to disable
 # logging to a file.
-logfile = "/tmp/racd.log"
+logfile = "/var/log/racd.log"
 
 # The log level for the log file.  There are five levels:
 #   0 - debug output
 
 # Directory name where the validated vhost config files are placed.
 # This directory must exist.
-sysconfdir = "/tmp/vhosts"
+sysconfdir = "/etc/apache2/vhosts"
 
 # Directory where all config files that load modules lie.
 # This is used to load the required modules when checking vhost
 # config files with apache2 -t.
-modconfdir = "/tmp/mods-enabled"
+modconfdir = "/etc/apache2/mods-enabled"
 
 # This must be the same directory as the ServerRoot in the main
 # apache config.
 serverroot = "/usr/lib/apache2"
 
-# Minimum time, in seconds, to wait between two reloads of the
-# apache config.
+# Minimum time, in seconds, to wait between two reloads of the apache config.
 reloadspan = 600
 
 # Command to issue when reloading the apache config.  This is run
-# with system().
+# with os.system().
 reloadcmd = "/etc/init.d/apache2 reload"
 
 # The path to the apache executable, used for calling apache2 -t.
 # * username - name of the file's owner
 vhostprefix = """
 ServerName %(basename)s
-SuexecUserGroup %(username)s users
+SuexecUserGroup %(username)s %(username)s
 """
 
+# ------ POLICY SETTINGS -------------------------------------------------------
+
 # The custom policy for contexts (<Foo> sections).  This extends the
 # default policy set in the rac.policy module.
 # The key is the lowercased context name.

File rac/__init__.py

     :license: BSD license.
 """
 
+__license__ = 'GPL'
 __version__ = '0.1'
+__url__ = ''
+
 
 DEFAULT_CONFIG_FILE = '/etc/rac.conf.py'
 

File rac/policy.py

 # * other true value: allow
 
 contexts = {
-    'virtualhost': False,
 
     'directory': True,
     'directorymatch': True,
     'limit': True,
     'limitexcept': True,
 
-    'proxy': False,
-    'proxymatch': False,
-
     'ifdefine': True,
     'ifmodule': True,
     'ifversion': True,
     '_root': True,
 }
 
+# default contexts that are rejected:
+# virtualhost
+# proxy
+# proxymatch
+
 
 directives = {
     'serveralias': 1,
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+    rac setup
+    ~~~~~~~~~
+
+    :copyright: 2007 by Georg Brandl.
+    :license: BSD license.
+"""
+
+from distutils.core import setup
+
+import rac
+
+setup(
+    name = 'Pygments',
+    version = rac.__version__,
+    url = rac.__url__,
+    license = rac.__license__,
+    author = 'Georg Brandl',
+    author_email = 'georg@python.org',
+    description = 'rac - restricted apache config',
+    long_description = 'rac - restricted apache config',
+    keywords = 'restricted apache config',
+    packages = ['rac'],
+    scripts = ['racc', 'racd'],
+    data_files = [('/etc', ['rac.conf.py'])],
+    platforms = 'any',
+    classifiers = [
+        'Intended Audience :: System Administrators',
+        'Programming Language :: Python',
+        'Operating System :: OS Independent',
+    ]
+)