From 90ab4b8ec013576429063b58655dec9a42f5cda1 Mon Sep 17 00:00:00 2001
From: Rolf Niepraschk <Rolf.Niepraschk@ptb.de>
Date: Wed, 11 Nov 2020 14:26:57 +0100
Subject: [PATCH] parameter for destination host

---
 install | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/install b/install
index 862f863..60ab61a 100755
--- a/install
+++ b/install
@@ -6,13 +6,14 @@
 
 # Aufruf:
 #
-# ./install
+# ./install 
+# $1 = host (optional, default: localhost)
 
 PROJECT="webapps-deliverer"
 
 SOURCE_PATH=../${PROJECT}/ 
 DEST_PATH=/usr/local/share/
-TARGET_HOST=a73434.berlin.ptb.de
+TARGET_HOST=${1:-localhost}
 TARGET_PATH=${DEST_PATH}${PROJECT}
 FILE_LIST="./files.dat"
 DEST_USER=nobody
@@ -30,9 +31,9 @@ rsync --info=STATS1 -azvL --delete --keep-dirlinks \
 ssh root@${TARGET_HOST} /bin/bash -l <<EOF
 chown -R ${DEST_USER} ${TARGET_PATH}
 cd ${TARGET_PATH}
+systemctl link \$PWD/webapps-deliverer.service
+systemctl enable webapps-deliverer.service
 systemctl daemon-reload
-systemctl link   \$PWD/webapps-deliverer.service
-systemctl enable  webapps-deliverer.service
 systemctl restart webapps-deliverer.service
 systemctl status webapps-deliverer.service
 EOF
-- 
GitLab