[vhffs-dev] [715] Update vhffs-fs config script to allow some customization. |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
Revision: 715
Author: beuss
Date: 2007-07-12 11:49:12 +0000 (Thu, 12 Jul 2007)
Log Message:
-----------
Update vhffs-fs config script to allow some customization.
Removed references to prefix since it defaults to NONE. I don't want to use autotools anymore so if someone wants to do something clean, DO IT! :)
removed vhffs.conf.in which was useless.
Modified Paths:
--------------
trunk/configure.ac
trunk/vhffs-fs/Makefile.am
trunk/vhffs-fs/config.h.in
trunk/vhffs-fs/configure.ac
trunk/vhffs-fs/vhffsfs.c
Added Paths:
-----------
trunk/vhffs-fs/bootstrap.sh
trunk/vhffs-fs/vhffsfs.conf.dist
Removed Paths:
-------------
trunk/vhffs-backend/conf/vhffs.conf.in
trunk/vhffs-fs/vhffsfs.conf
Property Changed:
----------------
trunk/vhffs-fs/
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2007-07-12 10:20:23 UTC (rev 714)
+++ trunk/configure.ac 2007-07-12 11:49:12 UTC (rev 715)
@@ -25,7 +25,7 @@
AC_HELP_STRING([--with-conf-path=path],
[Complete path for configuration files (/etc/vhffs)]),
CONFDIR=$withval,
- CONFDIR=$prefix/etc/vhffs
+ CONFDIR=/etc/vhffs
)
AC_SUBST(CONFDIR)
@@ -33,7 +33,7 @@
AC_HELP_STRING([--with-shell-path=path],
[Complete path for tux shell (/bin)]),
SHELLDIR=$withval,
- SHELLDIR=$prefix/usr/bin
+ SHELLDIR=/usr/bin
)
AC_SUBST(SHELLDIR)
@@ -42,7 +42,7 @@
AC_HELP_STRING([--with-tools-path=path],
[Complete path for tools (executables) (/usr/local/bin)]),
TOOLSDIR=$withval,
- TOOLSDIR=$prefix/usr/local/bin
+ TOOLSDIR=/usr/local/bin
)
AC_SUBST(TOOLSDIR)
@@ -51,7 +51,7 @@
AC_HELP_STRING([--with-doc-path=path],
[Complete path for documentation files (/usr/share/doc/vhffs)]),
DOCDIR=$withval,
- DOCDIR=$prefix/usr/share/doc/vhffs
+ DOCDIR=/usr/share/doc/vhffs
)
AC_SUBST(DOCDIR)
@@ -60,7 +60,7 @@
AC_HELP_STRING([--with-api-path=path],
[Path for perl modules (API) (/usr/share/vhffs/api)]),
VHFFS_LIBDIR=$withval,
- VHFFS_LIBDIR=$prefix/usr/share/vhffs/api
+ VHFFS_LIBDIR=/usr/share/vhffs/api
)
APIDIR=$VHFFS_LIBDIR/Vhffs
AC_SUBST(APIDIR)
@@ -71,7 +71,7 @@
AC_HELP_STRING([--with-web-path=path],
[Complete path for web interface (panel) (/usr/share/vhffs/panel)]),
PANELDIR=$withval,
- PANELDIR=$prefix/usr/share/vhffs/panel
+ PANELDIR=/usr/share/vhffs/panel
)
AC_SUBST(PANELDIR)
@@ -80,7 +80,7 @@
AC_HELP_STRING([--with-template-path=path],
[Complete path for web templates (panel) (/usr/share/vhffs/templates)]),
TEMPLATESDIR=$withval,
- TEMPLATESDIR=$prefix/usr/share/vhffs/templates
+ TEMPLATESDIR=/usr/share/vhffs/templates
)
AC_SUBST(TEMPLATESDIR)
@@ -88,7 +88,7 @@
AC_HELP_STRING([--with-backend-path=path],
[Complete path for web backend (/usr/share/vhffs/backend)]),
BACKENDDIR=$withval,
- BACKENDDIR=$prefix/usr/share/vhffs/backend
+ BACKENDDIR=/usr/share/vhffs/backend
)
AC_SUBST(BACKENDDIR)
@@ -97,7 +97,7 @@
AC_HELP_STRING([--with-robot-path=path],
[Complete path for robots file (/usr/lib/vhffs/bots)]),
BOTSDIR=$withval,
- BOTSDIR=$prefix/usr/lib/vhffs/bots
+ BOTSDIR=/usr/lib/vhffs/bots
)
AC_SUBST(BOTSDIR)
@@ -106,7 +106,7 @@
AC_HELP_STRING([--with-jabber-path=path],
[Complete path for jabber pipe (/usr/share/vhffs/jabber)]),
JABBERDIR=$withval,
- JABBERDIR=$prefix/usr/share/vhffs/jabber
+ JABBERDIR=/usr/share/vhffs/jabber
)
AC_SUBST(JABBERDIR)
@@ -115,7 +115,7 @@
AC_HELP_STRING([--with-listengine-path=path],
[Complete path for jabber pipe (/usr/lib/vhffs/listengine)]),
LEDIR=$withval,
- LEDIR=$prefix/usr/lib/vhffs/listengine
+ LEDIR=/usr/lib/vhffs/listengine
)
AC_SUBST(LEDIR)
@@ -124,7 +124,7 @@
AC_HELP_STRING([--with-listengine-web-path=path],
[Complete path for listengine web file (/usr/share/vhffs/listengine)]),
LEWEB=$withval,
- LEWEB=$prefix/usr/lib/vhffs/listengine
+ LEWEB=/usr/lib/vhffs/listengine
)
AC_SUBST(LEWEB)
@@ -133,7 +133,7 @@
AC_HELP_STRING([--with-mail-path=path],
[Complete path for email files (/usr/share/vhffs/listengine)]),
MAILSDIR=$withval,
- MAILSDIR=$prefix/usr/lib/vhffs/listengine
+ MAILSDIR=/usr/lib/vhffs/listengine
)
AC_SUBST(MAILSDIR)
@@ -142,7 +142,7 @@
AC_HELP_STRING([--with-intl-path=path],
[Complete path for localization files (/usr/share/vhffs/intl)]),
INTLDIR=$withval,
- INTLDIR=$prefix/usr/share/vhffs/intl
+ INTLDIR=/usr/share/vhffs/intl
)
AC_SUBST(INTLDIR)
@@ -151,7 +151,7 @@
AC_HELP_STRING([--with-doc-path=path],
[Complete path for documentation files (/usr/share/doc/vhffs)]),
DOCSDIR=$withval,
- DOCSDIR=$prefix/usr/share/doc/vhffs
+ DOCSDIR=/usr/share/doc/vhffs
)
AC_SUBST(DOCSDIR)
@@ -161,7 +161,7 @@
AC_HELP_STRING([--with-compat-path=path],
[Complete path for compatibility scripts (/usr/share/doc/vhffs/compat)]),
COMPATDIR=$withval,
- COMPATDIR=$prefix/usr/share/doc/vhffs/compat
+ COMPATDIR=/usr/share/doc/vhffs/compat
)
AC_SUBST(COMPATDIR)
Deleted: trunk/vhffs-backend/conf/vhffs.conf.in
===================================================================
--- trunk/vhffs-backend/conf/vhffs.conf.in 2007-07-12 10:20:23 UTC (rev 714)
+++ trunk/vhffs-backend/conf/vhffs.conf.in 2007-07-12 11:49:12 UTC (rev 715)
@@ -1,328 +0,0 @@
-######
-# This is the default configuration file for VHFFS
-# Please ask vhffs@xxxxxxxxx for questions
-# Visit http://www.vhffs.org
-###############################
-<global>
- #This is the name of your hosting service
- host_name = My Hosting service
-
- #This is the URL of the website of the hoster,
- #if unset, no links will be added to hoster website
- host_website = http://vhffs.org/
-
- #The directory where you store ALL data
- datadir = /data
-
- #Directory which contains templates for the vhffs panel
- templatedir = @TEMPLATESDIR@
-
- #Directory which contains themes
- themesdir = @PANELDIR@/themes
-
- #The default theme
- default_theme = vhffs
-
- #Directory which contains internationalisation stuff
- intldir = @INTLDIR@/
-
- # Directory used to store captcha files
- # Should be readable for webserver user but not accessible
- # to end users.
- captchadir = /tmp
-
- #The default language
- default_language = en_US
-
- #Mail sent to hosted people have From: vhffs_master
- vhffs_master = VHFFS Admin <admin@localhost>
-
- #Mail of moderator
- vhffs_moderator = VHFFS Admin <moderator@localhost>
-
- #Tag inserted in the subject of each sended mail
- mailtag = [VHFFS]
-
- #Allow subscribing to the platform
- allow_subscribe = yes
-
- #The mail where alert are sent
- alert_mail = root@localhost
-
- moderation = yes
-
- #Whether to use vhffsfs or not. vhffsfs allows you to provide a
- #virtual home directory depending on the uid of the running process
- #in order to avoid using of a virtual chroot to provide ftp, sftp, or a shell
- use_vhffsfs = no
-
- ########
- #Modules
- #For each modules, you can use it if you declare "yes"
- #For example, to disable the web service, you
- #can specify use_web = no
- <modules>
- use_web = yes
- use_mysql = yes
- use_mail = no
- use_cvs = no
- use_svn = no
- use_postgres = no
- use_dns = no
- use_mailing = no
- use_mailuser = no
- use_repository = no
- </modules>
-
- ####################
- #Panel configuration
- <panel>
- #URL to the panel
- url = http://your.panel.url
-
- #This is the URL display for the "Help" link in the panel
- help_url = http://help.hoster
-
- #URL to the statistics
- stats_url = http://stats.hoster
-
-
- phpmyadmin_url = http://phpmyadmin.hoster
- phppgadmin_url = http://phppgadmin.hoster
-
- #Is the panel open or not ?
- open = yes
-
- #Use the public section of VHFFS
- use_public = yes
-
- #Use avatar or not ? If yes, you must create a /data/avatar and change owner/permissions
- #so that the webserver can write into this directory
- use_avatar = yes
- users = yes
- groups = yes
-
- #Print statistics in the main page of VHFFS ?
- stats_on_home = yes
-
- #Notation is useful to handle aggressive users
- #If a project is refused by moderation, the note os the user if decreased
- #If a project or service is accepted, the note is increased
- use_notation = yes
-
- #Use RSS for users and groups ?
- <rss>
- users = yes
- groups = yes
- </rss>
- </panel>
-</global>
-
-
-
-
-#################################################
-# Backend configuration
-#################################################
-<database>
- driver = pg
- #Database to use
- db_name=vhffs
- #Read Write User Name
- db_username=vhffs
- #Passwor
- db_password=vhffs
- #DataBase Server
- db_host=localhost
- #Database port
- db_port = 5432
-</database>
-
-
-################################################
-# USERS AND GROUPS
-################################################
-#the default configuration for users
-<users>
- minuid = @MINUID@
- mingid = @MINGID@
- default_quota = 50
- bad_username_file = @CONFDIR@/badfile
- bad_groupname_file = @CONFDIR@/badgroup
- default_firstname = Vhffs Firstname
- default_lastname = Vhffs Lastname
- default_address = Vhffs Address
- default_city = Vhffs City
- default_zipcode = 123456
- default_mail = dave@xxxxxxxx
- default_country = Disneyland
- available_shells = /bin/bash /bin/tcsh /bin/zsh /bin/tuxshell
- default_shell = /bin/bash
-</users>
-
-
-
-#####################################
-# SERVICES
-#####################################
-<services>
-
- <web>
- # Where to find log from webserver, each webserver should be in a separate directory, example :
- # - /data/logs/web/incoming/webserver0
- # - /data/logs/web/incoming/webserver1
- # - ...
- log_incoming_root = /data/logs/web/incoming
-
- # The number of maximum rotations, a rotation is made each time the robots to create stats is ran
- log_incoming_rotations = 7
-
- # Should I compress rotated logs ?
- log_incoming_compress = yes
-
- # Where to put parsed logfile from each website, it uses the same hash model of web storage,
- # consider using the same tree for both so user have access to its logs in its ftp account.
- # If log_parsed_root = /data/web and log_parsed_dir = logs then example.com logs
- # will be in /data/web/1b/df/72/example.com/logs/
- log_parsed_root = /data/web
-
- # Same as incoming
- log_parsed_rotation = 7
- log_parsed_compress = yes
-
- # Where to find the awstat sampe file ?
- log_awstats_sample = /usr/lib/vhffs/bots/misc/awstats.sample
-
- # Where to find awstat (caution, you must apply the vhffs patch on)
- log_awstats = /var/www/stats/awstats.pl
-
- # Is apache running locally or not ? (If not you should use the ugly remote restart of apaches over nfs)
- log_apachelocal = yes
-
- # If it runs locally, where is apache2ctl ?
- log_apachectl = /usr/sbin/apache2ctl
- </web>
-
- #DNS configuration
- <dns>
- # default configuration for new domains and new entries
- default_ns1 = ns1.hoster.org
- default_ns2 = ns2.hoster.org
- default_mx1 = mx1.hoster.org
- default_mx2 = mx2.hoster.org
- default_a = 1.2.3.4
- default_aaaa = FEDC::1
- default_ttl = 86400
- default_aux = 0
- default_refresh = 28800
- default_retry = 7200
- default_expire = 604800
- default_minimum = 86400
- default_serial = 1
- default_mbox = adm.your.hoster.ext.
-
- # initial configuration of each domain name
- <init>
- <a>
- www = 80.0.0.1
- default = 10.0.0.1
- </a>
- <mx>
- 10 = mx1.hoster.org
- 20 = mx2.hoster.org
- </mx>
- <ns>
- ns1.hoster.org
- ns2.hoster.org
- </ns>
- </init>
- </dns>
- <apache>
- port=80
- pidfile=/var/run/apache.pid
- confdir=/etc/apache/conf/
- htdocsdir=
- default_domain = vhffs.org
- </apache>
-
- <cvs>
- cvsweb_url = "http://cvsweb.hoster"
- cvsdoc_url = "http://faq.hoster"
- </cvs>
- <mysql>
- host = localhost
- username = root
- password = vhffs
- mysqldump_path = /usr/bin/mysqldump
- </mysql>
- <postgresql>
- host = localhost
- username = vhffs
- password = zepojf
- </postgresql>
- <subversion>
- svnweb_url = "http://svnweb.hoster"
- help_url = "http://myhost.tld/file.html"
- uid = 33
- gid = 33
- </subversion>
- <mail>
- use_nospam = yes
- use_novirus = yes
- </mail>
-
- #The mailuser service allow a user to get a mail account
- #on a default domain
- #With with module, ALL users get an email adress for a domain
- #The domain MUST exists on VHFFS, and should be owned by the user given in this configuration
- # groupneeded : the user cannot create his mail account if it doesn't have a group
- <mailuser>
- activate = no
- groupneeded = yes
- domain = myhost.org
- user = cat
- </mailuser>
- <mailing>
- default_domain = lists.vhffs.org
- </mailing>
-
- #Configuration for listengine
- <listengine>
- #The domain is used when listengine bounces mails to SMTP server
- #Listengine will send HELO domain to the SMTP sever
- domain = "myhost.tld"
- #Where we store listengine data
- datadir = "/data/listengine"
- #Email of listmaster
- listmaster = "listmaster@xxxxxxxxxx"
- #SMTP Server to bounce listengine mails
- smtp_server = "localhost"
- #Directory which contains template for the archives
- templatesdir = @LEWEB@/templates/
- #Directory which contains misc files
- miscdir = @LEDIR@/misc/
- #Url of archives
- www-archives = http://localhost/listengine
- </listengine>
-
-
- #Configuration of download repository
- <repository>
- repository_url = "http://download.vhffs.org/"
- default_quota = 1024
- </repository>
-</services>
-
-
-#Robots configuration
-<robots>
- #Robots should log or not ?
- use_logging = yes
- #Logfile to log events
- logfile = /var/log/vhffs.log
- #Robots should use lock file ?
- #If they do, only one robot can be executed in the same-time
- use_lock = yes
- lockfile = /var/lock/vhffslock
-</robots>
-
Property changes on: trunk/vhffs-fs
___________________________________________________________________
Name: svn:ignore
+ configure
Makefile.in
config.log
config.h
.deps
Makefile
config.status
stamp-h1
autom4te.cache
vhffsfs
aclocal.m4
Modified: trunk/vhffs-fs/Makefile.am
===================================================================
--- trunk/vhffs-fs/Makefile.am 2007-07-12 10:20:23 UTC (rev 714)
+++ trunk/vhffs-fs/Makefile.am 2007-07-12 11:49:12 UTC (rev 715)
@@ -2,3 +2,15 @@
vhffsfs_SOURCES=md5c.c vhffsfs.c
vhffsfs_PROGRAMS=vhffsfs
+vhffsfsconfdir=@CONFDIR@
+vhffsfsconf_DATA=vhffsfs.conf.dist
+CONF_FILE=@CONFDIR@/vhffsfs.conf
+
+install-data-hook:
+ @if test -f $(DESTDIR)$(CONF_FILE) ; then \
+ echo "$@ will not overwrite existing $(DESTDIR)$(CONF_FILE)" ; \
+ else \
+ echo "$(INSTALL_DATA) vhffs.conf $(DESTDIR)$(CONF_FILE)"; \
+ $(INSTALL_DATA) $(vhffsfsconf_DATA) $(DESTDIR)$(CONF_FILE); \
+ fi
+
Added: trunk/vhffs-fs/bootstrap.sh
===================================================================
--- trunk/vhffs-fs/bootstrap.sh 2007-07-12 10:20:23 UTC (rev 714)
+++ trunk/vhffs-fs/bootstrap.sh 2007-07-12 11:49:12 UTC (rev 715)
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -x
+aclocal
+automake --add-missing --copy
+autoconf
Property changes on: trunk/vhffs-fs/bootstrap.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/vhffs-fs/config.h.in
===================================================================
--- trunk/vhffs-fs/config.h.in 2007-07-12 10:20:23 UTC (rev 714)
+++ trunk/vhffs-fs/config.h.in 2007-07-12 11:49:12 UTC (rev 715)
@@ -176,6 +176,9 @@
/* ??? */
#undef VHFFSFS_CACHE_QUERY_TIMEOUT
+/* VHFFS-fs config file */
+#undef VHFFSFS_CONFIG
+
/* Enable caching facilities */
#undef WITH_CACHE
Modified: trunk/vhffs-fs/configure.ac
===================================================================
--- trunk/vhffs-fs/configure.ac 2007-07-12 10:20:23 UTC (rev 714)
+++ trunk/vhffs-fs/configure.ac 2007-07-12 11:49:12 UTC (rev 715)
@@ -9,6 +9,7 @@
AM_INIT_AUTOMAKE
PKG_PROG_PKG_CONFIG
+
# Checks for programs.
AC_PROG_CC
@@ -47,6 +48,18 @@
AC_SUBST(VHFFSFSDIR)
+# Use the same switch as root configure.ac. This way, all config files
+# are in the same dir
+AC_ARG_WITH(conf-path,
+ AC_HELP_STRING([--with-conf-path=path],
+ [Complete path for configuration files (/etc/vhffs)]),
+ CONFDIR=$withval,
+ CONFDIR=/etc/vhffs
+)
+AC_SUBST(CONFDIR)
+
+AC_DEFINE_UNQUOTED(VHFFSFS_CONFIG, ["$CONFDIR/vhffsfs.conf"], [VHFFS-fs config file])
+
# Needed for fuse
AC_DEFINE([_FILE_OFFSET_BITS], [64], [Required for fuse to works correctly])
AC_DEFINE([_REENTRANT], [1], [Reentrant program])
Modified: trunk/vhffs-fs/vhffsfs.c
===================================================================
--- trunk/vhffs-fs/vhffsfs.c 2007-07-12 10:20:23 UTC (rev 714)
+++ trunk/vhffs-fs/vhffsfs.c 2007-07-12 11:49:12 UTC (rev 715)
@@ -7,7 +7,6 @@
*/
#define VHFFSFS_MAXCONNDB 5
-#define VHFFSFS_CONFIG "/etc/vhffsfs.conf"
#define VHFFSFS_EMPTYDIR "/tmp/emptydir"
#define _GNU_SOURCE
@@ -53,8 +52,6 @@
#include "md5.h"
#ifdef WITH_CACHE
-#define VHFFSFS_CACHE_QUERY_TIMEOUT 600
-#define VHFFSFS_CACHE_QUERY_FLUSH_EVERY 1800
typedef struct {
char *query;
Deleted: trunk/vhffs-fs/vhffsfs.conf
===================================================================
--- trunk/vhffs-fs/vhffsfs.conf 2007-07-12 10:20:23 UTC (rev 714)
+++ trunk/vhffs-fs/vhffsfs.conf 2007-07-12 11:49:12 UTC (rev 715)
@@ -1,11 +0,0 @@
-grouppath /data/groups
-webspath /data/web
-repositoriespath /data/repository
-dbhost 127.0.0.1
-dbport 5432
-dbuser vhffs
-dbpass mypass
-dbname vhffs
-dbtimeout 10
-minimumrightfile 00400
-minimumrightdir 02700
Copied: trunk/vhffs-fs/vhffsfs.conf.dist (from rev 706, trunk/vhffs-fs/vhffsfs.conf)