Skip to content

Commit 88c7e60

Browse files
installation bug fixed
1 parent 9e54e12 commit 88c7e60

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

setup.sh

+4-6
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
# ----------------------------
55
# This script installs, uninstalls, backs up, restores App, and includes load testing using Locust.
66

7-
USER_NAME=$USER
8-
echo $USER_NAME
9-
echo $HOME
107
if [ "$(whoami)" = "root" ]; then
11-
USER_NAME=$(cat /etc/passwd | grep '/home' | cut -d: -f1 | tail -n 1)
8+
USER_NAME=$(cat /etc/passwd | grep '/home' | cut -d: -f1 | head -n 1)
129
else
1310
USER_NAME=$(whoami)
1411
fi
15-
echo $USER_NAME
12+
13+
echo "Welcome on board $USER_NAME"
1614
USER_HOME=/home/$USER_NAME
1715

1816
# Define directories and file paths
@@ -29,7 +27,7 @@ EXECUTABLE="/usr/local/bin/$APP_NAME_LOWER-installer"
2927
# Application-related file paths
3028
HOST_URL="http://localhost:5050"
3129
INSTALLER_SCRIPT="setup.sh"
32-
FLASK_LOG_FILE="$LOG_DIR/$APP_NAME_LOWER-flask.log"
30+
FLASK_LOG_FILE="$LOG_DIR/flask.log"
3331

3432
# Backup settings
3533
NUM_BACKUPS=5

src/scripts/dashboard.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ FLASK_APP_PATH="${FLASK_APP_PATH:-$PROJECT_DIR/app.py}"
5656
REQUIREMENTS_FILE="${REQUIREMENTS_FILE:-$PROJECT_DIR/requirements.txt}"
5757
FLASK_PORT="${FLASK_PORT:-5050}"
5858
APP_NAME="systemguard"
59-
LOG_FILE="/home/$(whoami)/logs/$APP_NAME-flask.log"
59+
LOG_FILE="/home/$(whoami)/logs/flask.log"
6060
USERNAME="$(whoami)"
6161
CONDA_ENV_NAME=$APP_NAME
6262
GIT_REMOTE_URL="https://github.com/codeperfectplus/SystemDashboard" # Set this if you want to add a remote

0 commit comments

Comments
 (0)