From ba51d04b50d22c2d241dad7d2b9d34386ce2d54b Mon Sep 17 00:00:00 2001 From: akanealw Date: Mon, 4 Mar 2024 20:32:22 -0600 Subject: [PATCH] updated root check and home folder check --- alpine/download-alpine-scripts.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/alpine/download-alpine-scripts.sh b/alpine/download-alpine-scripts.sh index b78cb78..da91e0e 100755 --- a/alpine/download-alpine-scripts.sh +++ b/alpine/download-alpine-scripts.sh @@ -1,8 +1,13 @@ #!/bin/ash -if ! [ $(id -u) = 0 ]; then +if [[ ! $(id -u) = 0 ]]; then echo "Please run as root!" -exit 1 + exit 1 +fi + +if [[ ! -d /home/akanealw ]]; then + echo "User akanealw not found." + exit 1 fi mkdir /home/akanealw/scripts > /dev/null 2>&1