mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2025-12-06 17:15:38 -08:00
29 lines
712 B
Bash
Executable File
29 lines
712 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo "---------------------------------------------------------"
|
|
echo "[INSTALL] Run install.sh"
|
|
echo "---------------------------------------------------------"
|
|
|
|
# Set environment variables
|
|
INSTALL_DIR=/home/pi # Specify the installation directory here
|
|
|
|
# Check if script is run as root
|
|
if [[ $EUID -ne 0 ]]; then
|
|
echo "This script must be run as root. Please use 'sudo'."
|
|
exit 1
|
|
fi
|
|
|
|
# Prepare the environment
|
|
apt-get update
|
|
apt-get install sudo -y
|
|
|
|
# Install Git
|
|
apt-get install -y git
|
|
|
|
# Clone the application repository
|
|
git clone https://github.com/jokob-sk/Pi.Alert "$INSTALL_DIR/pialert"
|
|
|
|
|
|
# Start PiAlert
|
|
"$INSTALL_DIR/pialert/dockerfiles/start.sh"
|