#!/bin/bash

# apt install -y python3-pyqt6.qtwebengine
# apt install -y python3-pyqt6.qtquick3d
# apt install -y python3-pyqt6.qtquick

echo "Installing Printer Screen Menu..."
echo "Cleaning up old installation..."
rm -rf /etc/systemd/system/printer-screen.service
rm -rf /opt/Printer_Screen_Menu

echo "Copying new files..."
mkdir -p /opt/Printer_Screen_Menu
cp -r ./. /opt/Printer_Screen_Menu/

echo "Setting up systemd service..."
chmod +x /opt/Printer_Screen_Menu/run.sh

systemctl disable printer-screen.service
cp printer-screen.service /etc/systemd/system/
systemctl daemon-reload
systemctl enable printer-screen.service
systemctl start printer-screen.service

echo "Installation complete. Printer Screen Menu should now be running."