X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=Makefile;h=67bf83c09084cc532b422b6a2a4d9c59f4e64c21;hp=6ad9f8cc157ef1913d8e5c104cfb5ba8b5c72578;hb=refs%2Fheads%2Frt_28256;hpb=35f3cb28e5d3fee1bc1a892acb9cc2d90f55d365 diff --git a/Makefile b/Makefile index 6ad9f8cc1..67bf83c09 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,11 @@ MASONDATA = ${FREESIDE_CACHE}/masondata #package maintainers DIST_CONF = ${FREESIDE_CONF}/default_conf +#mod_perl v2 1.999_22 on Apache 2.0 through 2.3 (Debian ancient through 7.x) +#APACHE_VERSION=2 +#Apache 2.4 (Debian 8.x) +APACHE_VERSION=2.4 + #deb FREESIDE_DOCUMENT_ROOT = /var/www/freeside #redhat, fedora, mandrake @@ -65,8 +70,11 @@ HTTPD_RESTART = /etc/init.d/apache2 restart #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) +#debian unstable/8.0+, apache2.4 +APACHE_CONF = /etc/apache2/conf-available #deb (3.1+), apache2 -APACHE_CONF = /etc/apache2/conf.d +#APACHE_CONF = /etc/apache2/conf.d + INSSERV_OVERRIDE = /etc/insserv/overrides FREESIDE_RESTART = ${INIT_FILE} restart @@ -79,6 +87,7 @@ INSTALLGROUP = root #edit the stuff below to have the daemons start QUEUED_USER=fs_queue +API_USER = fs_api SELFSERVICE_USER = fs_selfservice #never run on the same machine in production!!! @@ -97,7 +106,7 @@ RT_ENABLED = 1 RT_DOMAIN = example.com RT_TIMEZONE = US/Pacific #RT_TIMEZONE = US/Eastern -FREESIDE_URL = "http://localhost/freeside/" +FREESIDE_URL = "http://192.168.1.6/freeside/" #for now, same db as specified in DATASOURCE... eventually, otherwise? RT_DB_DATABASE = freeside @@ -220,6 +229,9 @@ perl-modules: s|%%%FREESIDE_CACHE%%%|${FREESIDE_CACHE}|g;\ " blib/lib/FS/cust_main/*.pm blib/lib/FS/cust_pkg/*.pm;\ perl -p -i -e "\ + s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\ + " blib/lib/FS/Daemon/*.pm;\ + perl -p -i -e "\ s|%%%FREESIDE_CONF%%%|${FREESIDE_CONF}|g;\ s|%%%FREESIDE_LOG%%%|${FREESIDE_LOG}|g;\ s|%%%FREESIDE_LOCK%%%|${FREESIDE_LOCK}|g;\ @@ -259,6 +271,7 @@ install-init: install -o root -g ${INSTALLGROUP} -m 711 init.d/freeside-init ${INIT_FILE} perl -p -i -e "\ s/%%%QUEUED_USER%%%/${QUEUED_USER}/g;\ + s/%%%API_USER%%%/${API_USER}/g;\ s/%%%SELFSERVICE_USER%%%/${SELFSERVICE_USER}/g;\ s/%%%SELFSERVICE_MACHINES%%%/${SELFSERVICE_MACHINES}/g;\ " ${INIT_FILE} @@ -267,7 +280,7 @@ install-init: install-apache: [ -e ${APACHE_CONF}/freeside-base.conf ] && rm ${APACHE_CONF}/freeside-base.conf || true [ -d ${APACHE_CONF} ] && \ - ( install -o root -m 755 htetc/freeside-base2.conf ${APACHE_CONF} && \ + ( install -o root -m 755 htetc/freeside-base${APACHE_VERSION}.conf ${APACHE_CONF} && \ ( [ ${RT_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-rt.conf ${APACHE_CONF} || true ) && \ ( [ ${TORRUS_ENABLED} -eq 1 ] && install -o root -m 755 htetc/freeside-torrus.conf ${APACHE_CONF} || true ) && \ perl -p -i -e "\ @@ -276,17 +289,20 @@ install-apache: s'%%%MASON_HANDLER%%%'${MASON_HANDLER}'g; \ " ${APACHE_CONF}/freeside-*.conf \ ) || true + [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && ( /usr/sbin/a2enconf freeside-base${APACHE_VERSION} ) || true + [ -d ${APACHE_CONF} ] && [ ${APACHE_VERSION} = '2.4' ] && [ -x /usr/sbin/a2disconf ] && ( /usr/sbin/a2disconf freeside-base2 ) || true + [ -d ${APACHE_CONF} ] && [ -x /usr/sbin/a2enconf ] && [ ${RT_ENABLED} -eq 1 ] && ( /usr/sbin/a2enconf freeside-rt ) || true [ -d ${INSSERV_OVERRIDE} ] && [ -x /sbin/insserv ] && ( install -o root -m 755 init.d/insserv-override-apache2 ${INSSERV_OVERRIDE}/apache2 && insserv -d ) || true install-selfservice: [ -e ~freeside ] || cp -pr /etc/skel ~freeside && chown -R freeside ~freeside - [ -e ~freeside/.ssh/id_dsa.pub ] || [ -e ~freeside/.ssh/id_rsa.pub ] || su - freeside -c 'ssh-keygen -t dsa' + [ -e ~freeside/.ssh/id_rsa.pub ] || su - freeside -c 'ssh-keygen' for MACHINE in ${SELFSERVICE_MACHINES}; do \ scp -r fs_selfservice/FS-SelfService ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\ ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; perl Makefile.PL && make" ;\ ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; sudo make install" ;\ - scp ~freeside/.ssh/id_dsa.pub ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\ - ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo ${SELFSERVICE_INSTALL_USERADD} freeside; sudo install -d -o freeside -m 755 ~freeside/.ssh/; sudo install -o freeside -m 600 ./id_dsa.pub ~freeside/.ssh/authorized_keys" ;\ + scp ~freeside/.ssh/id_rsa.pub ${SELFSERVICE_INSTALL_USER}@$$MACHINE:. ;\ + ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo ${SELFSERVICE_INSTALL_USERADD} freeside; sudo install -d -o freeside -m 755 ~freeside/.ssh/; sudo install -o freeside -m 600 ./id_rsa.pub ~freeside/.ssh/authorized_keys" ;\ ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo install -o freeside -d /usr/local/freeside" ;\ done @@ -444,7 +460,7 @@ release: #cd /home/ivan git archive --prefix=freeside-${VERSION}/ ${TAG} | gzip -9 >freeside-${VERSION}.tar.gz - scp freeside-${VERSION}.tar.gz ivan@420.am:/var/www/www.sisd.com/freeside/ + scp freeside-${VERSION}.tar.gz ivan@freeside.biz:/var/www/www.freeside.biz/freeside/ mv freeside-${VERSION}.tar.gz .. #these things failing should not make release target fail, so: "|| true"