Skip to content

Commit 83a96dd

Browse files
committed
use curly braces for string concat
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
1 parent 4dbe6e1 commit 83a96dd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

functions/grott-install.bash

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ install_grott() {
2626
exit 1
2727
fi
2828
USERNAME="$2"
29-
INSTALL_DIR="/home/$USERNAME/grott"
29+
INSTALL_DIR="/home/${2}/grott"
3030

3131
SERVICE_FILE="/etc/systemd/system/grott.service"
3232

@@ -40,7 +40,7 @@ install_grott() {
4040
echo "Error: Invalid IP address format: $3"
4141
exit 1
4242
fi
43-
EXT_URL="http://$3:8080/growatt"
43+
EXT_URL="http://${3}:8080/growatt"
4444

4545
echo -n "[openHABian] Installing Grott Proxy with extension URL: $EXT_URL "
4646

@@ -71,7 +71,7 @@ install_grott() {
7171

7272
# Create grott.ini file from template
7373
if ! sed -e "s|%EXT_URL|$EXT_URL|g" \
74-
"${BASEDIR:-/opt/openhabian}/includes/grott.ini" > "$INSTALL_DIR/grott.ini"; then
74+
"${BASEDIR:-/opt/openhabian}/includes/grott.ini" > "${INSTALL_DIR}/grott.ini"; then
7575
echo "FAILED (sed substitution)"
7676
return 1
7777
fi

0 commit comments

Comments
 (0)