From 129101ac2ee4620dd3980bedafb6c7b5d0e54f7d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 11 Apr 2023 12:25:32 +0200 Subject: [PATCH] use arguments or variables --- install.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index d460b2c..7ea6865 100755 --- a/install.sh +++ b/install.sh @@ -7,15 +7,17 @@ then exit 1 fi -useradd --shell /bin/sh --system --home-dir /usr/local/upfast upfast || +UFDIR=${1:=/srv/upfast} +USER=${1:=upfast} +useradd --shell /bin/sh --system --home-dir $UFDIR $UFUSER || exit 1 -mkdir -p /usr/local/upfast || # dodge copying of skeletons +mkdir -p "$UFDIR" || # dodge copying of skeletons exit 1 -chown upfast:upfast /usr/local/upfast -chmod 700 /usr/local/upfast +chown "$UFUSER:$UFUSER" "$UFDIR" +chmod 700 "$UFDIR" -su upfast -c' +su "$UFUSER" -c" cd git clone https://code.cronyakatsuki.xyz/tlast/upfast . || exit 1