X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=Makefile;h=ef34915d2c68c1cd957662ac720f96bd9d99e38f;hp=b1ad0118a36bc29dcabe16f6d38b8a55913deb43;hb=5d154e4e153a66c2349ee0c6ca942fa017bfb139;hpb=ab151ccd8108e6a4bc24076e6a1cd3899a817e6b diff --git a/Makefile b/Makefile index b1ad0118a..ef34915d2 100644 --- a/Makefile +++ b/Makefile @@ -57,14 +57,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 = useradd -#SELFSERVICE_INSTALL_USERADD = "pw useradd" +SELFSERVICE_INSTALL_USERADD = /usr/sbin/useradd +#SELFSERVICE_INSTALL_USERADD = "/usr/sbin/pw useradd" RT_ENABLED = 0 #RT_ENABLED = 1 @@ -174,11 +176,20 @@ install-init: 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" + 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 \ + 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