add install/debian/3.1/INSTALL script and script up some apache automation assuming...
authorivan <ivan>
Thu, 7 Apr 2005 10:35:26 +0000 (10:35 +0000)
committerivan <ivan>
Thu, 7 Apr 2005 10:35:26 +0000 (10:35 +0000)
Makefile
htetc/freeside-base.conf [new file with mode: 0644]
htetc/freeside-rt.conf [new file with mode: 0644]
install/debian/3.1/INSTALL [new file with mode: 0644]

index 4f8bebe..8fa09d6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -52,6 +52,10 @@ HTTPD_RESTART = /etc/init.d/apache restart
 #apache
 #HTTPD_RESTART = /usr/local/apache/bin/apachectl stop; sleep 10; /usr/local/apache/bin/apachectl startssl
 
+#(an include directory, not a file - "Include /etc/apache/conf.d" in httpd.conf)
+#deb (3.1+), 
+APACHE_CONF = /etc/apache/conf.d
+
 FREESIDE_RESTART = ${INIT_FILE} restart
 
 #deb, redhat, fedora, mandrake, suse, others?
@@ -78,8 +82,8 @@ SELFSERVICE_INSTALL_USER = ivan
 SELFSERVICE_INSTALL_USERADD = /usr/sbin/useradd
 #SELFSERVICE_INSTALL_USERADD = "/usr/sbin/pw useradd"
 
-RT_ENABLED = 0
-#RT_ENABLED = 1
+#RT_ENABLED = 0
+RT_ENABLED = 1
 RT_DOMAIN = example.com
 RT_TIMEZONE = US/Pacific;
 #RT_TIMEZONE = US/Eastern;
@@ -185,6 +189,14 @@ install-init:
        " ${INIT_FILE}
        ${INIT_INSTALL}
 
+install-apache:
+       [ -d ${APACHE_CONF} ] && \
+         install -o root -m 755 htetc/freeside-base.conf ${APACHE_CONF} && \
+         ( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \
+         perl -p -i -e "\
+           s'%%%FREESIDE_DOCUMENT_ROOT%%%'${FREESIDE_DOCUMENT_ROOT}'g; \
+         " ${APACHE_CONF}/freeside-*.conf
+
 install-selfservice:
        [ -e ~freeside/.ssh/id_dsa.pub ] || su - freeside -c 'ssh-keygen -t dsa'
        for MACHINE in ${SELFSERVICE_MACHINES}; do \
@@ -203,7 +215,7 @@ update-selfservice:
          ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; sudo make install" ;\
        done
 
-install: install-perl-modules install-docs install-init install-rt
+install: install-perl-modules install-docs install-init install-apache install-rt
 
 deploy: install
        ${HTTPD_RESTART}
diff --git a/htetc/freeside-base.conf b/htetc/freeside-base.conf
new file mode 100644 (file)
index 0000000..f8ebece
--- /dev/null
@@ -0,0 +1,15 @@
+PerlModule HTML::Mason
+<Directory %%%FREESIDE_DOCUMENT_ROOT%%%>
+AuthName Freeside
+AuthType Basic
+AuthUserFile /usr/local/etc/freeside/htpasswd
+require valid-user
+<Files ~ (\.cgi|\.html)>
+AddHandler perl-script .cgi .html
+PerlHandler HTML::Mason
+</Files>
+<Perl>
+require "/usr/local/etc/freeside/handler.pl";
+</Perl>
+</Directory>
+
diff --git a/htetc/freeside-rt.conf b/htetc/freeside-rt.conf
new file mode 100644 (file)
index 0000000..5ac8688
--- /dev/null
@@ -0,0 +1,15 @@
+<DirectoryMatch "^%%%FREESIDE_DOCUMENT_ROOT%%%/rt/.*NoAuth">
+<Limit GET POST>
+allow from all
+Satisfy any   
+SetHandler perl-script
+PerlHandler HTML::Mason
+</Limit>
+</DirectoryMatch>
+<DirectoryMatch "^%%%FREESIDE_DOCUMENT_ROOT%%%/rt/.*NoAuth/images">
+SetHandler None
+</DirectoryMatch>
+<Directory %%%FREESIDE_DOCUMENT_ROOT%%%/rt/Ticket/Attachment> 
+SetHandler perl-script 
+PerlHandler HTML::Mason 
+</Directory>
diff --git a/install/debian/3.1/INSTALL b/install/debian/3.1/INSTALL
new file mode 100644 (file)
index 0000000..99333f1
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+#echo "deb http://pouncequick.420.am/~ivan/freeside-sarge/ ./" >>/etc/apt/sources.list
+
+apt-get update
+apt-get install screen zsh libapache-mod-ssl libapache-mod-ssl-doc \
+        libapache-mod-perl rsync postgresql postgresql-contrib cvs fsh \
+        liburi-perl libhtml-tagset-perl libnet-perl \
+        libwww-perl libbusiness-creditcard-perl \
+        libmailtools-perl libtimedate-perl libdate-manip-perl \
+        libfile-counterfile-perl libfreezethaw-perl libstring-approx-perl \
+        libtext-template-perl libdbi-perl libdbd-pg-perl \
+        libdbix-dbschema-perl libnet-ssh-perl \
+        libstring-shellquote-perl libnet-scp-perl libhtml-mason-perl \
+        libtie-ixhash-perl libtime-duration-perl \
+        libhtml-widgets-selectlayers-perl \
+        libapache-dbi-perl libcache-cache-perl libdbd-mysql-perl \
+        libcrypt-passwdmd5-perl libnetaddr-ip-perl \
+        libnet-whois-raw-perl libchart-perl \
+        libmime-perl libapache-session-perl libhtml-tree-perl \
+        libhtml-format-perl libtest-inline-perl libclass-returnvalue-perl \
+        libdbix-searchbuilder-perl  liblog-dispatch-perl \
+        liblocale-maketext-lexicon-perl liblocale-maketext-fuzzy-perl \
+        libtext-wrapper-perl libtime-modules-perl libterm-readkey-perl \
+        libtext-autoformat-perl libtext-quoted-perl libregexp-common-perl \
+        libhtml-scrubber-perl libtree-simple-perl liblocale-subcountry-perl
+
+useradd freeside
+su postgres -c "createuser -P freeside"
+
+su freeside -c "createdb freeside"
+
+perl -p -i.fsbackup -e 's/^(User|Group) .*/$1 freeside/' /etc/apache/httpd.conf
+
+#?
+cd ../../..
+make install-perl-modules
+make create-config
+freeside-adduser -c -h /usr/local/etc/freeside/htpasswd ivan
+su freeside -c 'freeside-setup ivan'
+su freeside -c '/home/ivan/freeside/bin/populate-msgcat ivan'
+make deploy