Skip to content

Commit d5deec2

Browse files
chore: Update SystemGuard app setup script and dependencies in crontab
1 parent 825f911 commit d5deec2

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ System Guard is a Flask app designed to monitor server stats such as CPU, Memory
55
## Installation
66

77
```bash
8-
bash setup.sh
8+
wget https://github.com/codeperfectplus/SystemGuard/blob/main/setup.sh
9+
chmod +x setup.sh
10+
./setup.sh
911
```
1012

1113
It will install the SystemGuard app and its dependencies in the crontab and it will be started automatically every time the server is restarted. The app will be available at `http://localhost:5050`.

setup.sh

100644100755
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@
99
DOWNLOAD_DIR="/tmp"
1010
EXTRACT_DIR="/home/$USER/.systemguard"
1111

12-
Prompt the user to enter the version of SystemGuard to install
1312
echo "Enter the version of SystemGuard to install (e.g., v1.0.0 or 'latest' for the latest version):"
1413
read VERSION
14+
echo "Warning: This script will remove any existing installation of SystemGuard. Continue? (y/n)"
15+
read CONFIRM
16+
17+
if [ "$CONFIRM" != "y" ]; then
18+
echo "Installation aborted."
19+
exit 0
20+
fi
1521

1622
# If the user enters "latest", fetch the latest version number from GitHub
1723
if [ "$VERSION" == "latest" ]; then
@@ -91,4 +97,4 @@ chmod +x cronjob.sh
9197
echo "Executing the cronjob setup..."
9298
./cronjob.sh
9399

94-
echo "SystemGuard version $VERSION installed successfully!"
100+
echo "SystemGuard version $VERSION installed successfully!"

src/scripts/dashboard.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ log_message() {
77

88
# Determine the directory where this script is located
99
SCRIPT_DIR="$(dirname "$(realpath "$0" 2>/dev/null || readlink -f "$0")")"
10-
# root directory of the project is two levels up
1110
PROJECT_DIR="$(dirname "$(dirname "$SCRIPT_DIR")")"
12-
# Define variables for paths relative to the script's directory
1311
FLASK_APP_PATH="${FLASK_APP_PATH:-$PROJECT_DIR/app.py}"
1412
REQUIREMENTS_FILE="${REQUIREMENTS_FILE:-$PROJECT_DIR/requirements.txt}"
1513
FLASK_PORT="${FLASK_PORT:-5000}"

0 commit comments

Comments
 (0)