Service files
This commit is contained in:
23
install.sh
23
install.sh
@@ -70,6 +70,11 @@ cp "$HOME/.local/share/HamPackServer/hampackserverupdate" "$HOME/.local/bin/hamp
|
||||
cp "$HOME/.local/share/HamPackServer/scripts/start-hamclock.sh" "$HOME/.local/bin/start-hamclock.sh"
|
||||
chmod +x "$HOME/.local/bin/start-hamclock.sh"
|
||||
|
||||
mkdir -p "$HOME/.config/systemd/user"
|
||||
cp "$HOME/.local/share/HamPackServer/servicefiles/hamclock.service" "$HOME/.config/systemd/user/"
|
||||
systemctl --user daemon-reload
|
||||
systemctl --user enable --now hamclock
|
||||
|
||||
cd ~/.local/share/HamPackServer
|
||||
|
||||
echo "Updating system..."
|
||||
@@ -109,22 +114,6 @@ source packages.conf
|
||||
echo "Installing servers..."
|
||||
install_packages "${SERVERS[@]}"
|
||||
|
||||
# Initialize and start MariaDB if not already running
|
||||
if ! systemctl is-active --quiet mariadb; then
|
||||
if [ ! -d /var/lib/mysql/mysql ]; then
|
||||
echo "Initializing MariaDB..."
|
||||
sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
|
||||
fi
|
||||
echo "Starting MariaDB..."
|
||||
sudo systemctl enable --now mariadb
|
||||
fi
|
||||
|
||||
# Start Apache if not already running
|
||||
if ! systemctl is-active --quiet httpd; then
|
||||
echo "Starting Apache..."
|
||||
sudo systemctl enable --now httpd
|
||||
fi
|
||||
|
||||
echo "Installing utilities..."
|
||||
install_packages "${UTILITIES[@]}"
|
||||
|
||||
@@ -227,7 +216,7 @@ else
|
||||
fi
|
||||
if [ -n "$WAVELOG_DB_PASS" ]; then
|
||||
echo ""
|
||||
echo "Wavelog database password: $WAVELOG_DB_PASS. Please save this."
|
||||
echo "Wavelog database password: $WAVELOG_DB_PASS (Please save this.)"
|
||||
echo "(also stored in $WAVELOG_DIR/docker-compose.yaml)"
|
||||
fi
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user