50 lines
1.4 KiB
Bash
Executable File
50 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# ServerManager Pro - Linux Installer
|
|
|
|
set -e
|
|
|
|
RED='\033[0;31m'
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
NC='\033[0m'
|
|
|
|
echo -e "${GREEN}ServerManager Pro - Linux Installer${NC}"
|
|
echo "======================================"
|
|
|
|
# Detect architecture
|
|
ARCH=$(uname -m)
|
|
case $ARCH in
|
|
x86_64) DEB_ARCH="amd64" ;;
|
|
aarch64) DEB_ARCH="arm64" ;;
|
|
*) echo -e "${RED}Unsupported architecture: $ARCH${NC}"; exit 1 ;;
|
|
esac
|
|
|
|
# Find appropriate .deb file
|
|
DEB_FILE=$(find ../dist -name "*${DEB_ARCH}.deb" -o -name "*.deb" | head -1)
|
|
|
|
if [ -z "$DEB_FILE" ]; then
|
|
echo -e "${RED}No .deb package found${NC}"
|
|
echo "Please build the package first: ./build-all-platforms.sh"
|
|
exit 1
|
|
fi
|
|
|
|
echo -e "Installing: ${GREEN}$(basename $DEB_FILE)${NC}"
|
|
echo -e "Architecture: ${GREEN}$ARCH${NC}"
|
|
|
|
# Install dependencies
|
|
echo -e "${YELLOW}Installing dependencies...${NC}"
|
|
sudo apt update
|
|
sudo apt install -y libgtk-3-0 libnotify4 libnss3 libxss1 libxtst6 xdg-utils libatspi2.0-0 libuuid1 libappindicator3-1 libsecret-1-0
|
|
|
|
# Install the package
|
|
echo -e "${YELLOW}Installing package...${NC}"
|
|
sudo dpkg -i "$DEB_FILE" || {
|
|
echo -e "${YELLOW}Fixing dependencies...${NC}"
|
|
sudo apt -f install -y
|
|
}
|
|
|
|
echo -e "${GREEN}Installation completed successfully!${NC}"
|
|
echo ""
|
|
echo -e "You can now run: ${GREEN}servermanager-pro${NC}"
|
|
echo -e "Or find 'ServerManager Pro' in your application menu" |