kvs-linuxmint-dloadx/install.sh

40 lines
860 B
Bash

#!/bin/bash
GIT_REPO="https://git.willy.club/William/kvs-linuxmint-dloadx"
GIT_NAME="kvs-linuxmint-dloadx" # Must not contain spaces and/or weird characters
USERNAME=$(logname)
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root."
exit 1
fi
#apt update && apt -y install git wine setserial &&
#cd /opt/ &&
#git clone $GIT_REPO &&
#cd $GIT_NAME &&
adduser $USERNAME dialout &&
echo "[Unit]
Description=Wine Serial Fix
After=network.target
[Service]
Type=simple
ExecStart=bash /opt/$GIT_NAME/wine_serial_fix.sh $USERNAME
TimeoutStartSec=0
[Install]
WantedBy=graphical.target" > "/etc/systemd/system/wine-serial-fix.service" &&
systemctl daemon-reload &&
systemctl enable wine-serial-fix.service --now &&
su $USERNAME &&
wine DLOADX*.exe
echo -e "\e[1;32mFerdig. Logg ut og inn av økten eller start datamaskinen på nytt.\e[0m"