X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=Makefile;h=0c790b3e0f3e8c4bf2470b00f689c5a1f3985bfd;hp=f469d5fe8614cf4dd7ff29190ed4fefe73d7da53;hb=6083603212ea08b80c0f48ad61f4421aae85c31d;hpb=ef10539fa94bf35ef913bab50030a7f9242c2f9e diff --git a/Makefile b/Makefile index f469d5fe8..0c790b3e0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,8 @@ #!/usr/bin/make +#solaris and perhaps other very weirdass /bin/sh +#SHELL="/bin/ksh" + DATASOURCE = DBI:Pg:dbname=freeside #DATASOURCE=DBI:mysql:freeside @@ -40,7 +43,7 @@ HTTPD_RESTART = /etc/init.d/apache restart #openbsd #HTTPD_RESTART = kill -TERM `cat /var/www/logs/httpd.pid`; sleep 1; /usr/sbin/httpd -u -DSSL #apache -#HTTPD_RESTART = /usr/local/apache/bin/apachectl restart +#HTTPD_RESTART = /usr/local/apache/bin/apachectl stop; sleep 1; /usr/local/apache/bin/apachectl startssl FREESIDE_RESTART = ${INIT_FILE} restart @@ -57,12 +60,16 @@ QUEUED_USER=fs_queue FREESIDE_PATH = `pwd` SELFSERVICE_USER = fs_selfservice +#never run on the same machine in production!!! +SELFSERVICE_MACHINES = localhost # SELFSERVICE_MACHINES = www.example.com # SELFSERVICE_MACHINES = web1.example.com web2.example.com #user with sudo access on SELFSERVICE_MACHINES for automated self-service #installation. SELFSERVICE_INSTALL_USER = ivan +SELFSERVICE_INSTALL_USERADD = /usr/sbin/useradd +#SELFSERVICE_INSTALL_USERADD = "/usr/sbin/pw useradd" RT_ENABLED = 0 #RT_ENABLED = 1 @@ -77,8 +84,8 @@ FREESIDE_CONF = /usr/local/etc/freeside #rt/config.layout.in RT_PATH = /opt/rt3 -VERSION=1.5.0pre4 -TAG=freeside_1_5_0pre4 +VERSION=1.5.0pre5 +TAG=freeside_1_5_0pre5 help: @echo "supported targets: aspdocs masondocs alldocs docs install-docs" @@ -170,10 +177,22 @@ install-init: " ${INIT_FILE} install-selfservice: + [ -e ~freeside/.ssh/id_dsa.pub ] || su -c 'ssh-keygen -t dsa' - freeside + 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 600 ./id_dsa.pub ~freeside/.ssh/authorized_keys" ;\ + ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "sudo install -o freeside -d /usr/local/freeside" ;\ + done + +update-selfservice: 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" + RSYNC_RSH=ssh rsync -rlptz fs_selfservice/FS-SelfService/ ${SELFSERVICE_INSTALL_USER}@$$MACHINE:FS-SelfService ;\ + ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; perl Makefile.PL && make" ;\ + ssh ${SELFSERVICE_INSTALL_USER}@$$MACHINE "cd FS-SelfService; sudo make install" ;\ + done install: install-perl-modules install-docs install-init install-rt