Removed setup fedora, added support for debian, fedora and arch based distro

This commit is contained in:
2023-06-19 10:28:53 +02:00
parent 153db66224
commit bcf5e87801
3 changed files with 42 additions and 18 deletions

View File

@@ -6,7 +6,7 @@ This repo contains the script to manage multiple mcr bot on a single VM/Containe
```bash
├── start.sh
├── setup-fedora.sh
├── setup-linux.sh
├── setup-vpn.sh
├── update.sh
├── Microsoft-Rewards-bot
@@ -25,7 +25,7 @@ This repo contains the script to manage multiple mcr bot on a single VM/Containe
Clone the project
```bash
curl -sSL https://git.justw.tf/Lightemerald/mcr-bot/raw/branch/main/setup-fedora.sh | bash
curl -sSL https://git.justw.tf/Lightemerald/mcr-bot/raw/branch/main/setup-linux.sh | bash
```
Add your VPN files (.ovpn) to `./vpn` then run
@@ -42,7 +42,7 @@ sh start.sh
### If using LXC
Execute this command to allow the container to use TUN kernel module, replace [id_ct] with the LXC id in proxmox
Execute this command to allow the container to use TUN kernel module (needed for openvpn), replace [id_ct] with the LXC id in proxmox
```bash
echo -e "lxc.cgroup.devices.allow: c 10:200 rwm\nlxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file" >> /etc/pve/lxc/[id_ct].conf
```

View File

@@ -1,15 +0,0 @@
#!/bin/bash
sudo dnf up -y
sudo dnf in nano NetworkManager NetworkManager-openvpn openvpn python python*-pip python*-tkinter chromedriver chromium xorg-x11-server-Xvfb git wget unzip -y
git clone https://git.justw.tf/Lightemerald/mcr-bot && cd mcr-bot
git clone https://github.com/farshadz1997/Microsoft-Rewards-bot && cd Microsoft-Rewards-bot && git checkout 03476776e9c58029dedaeee431958b5d04364bcf && pip install -r requirements.txt
cd .. && mkdir vpn
cp ./config.txt.sample config.txt
chmod +x ./*.sh
clear
echo "edit config.txt"
echo "Add your VPN files (.ovpn) in ./vpn"
echo "Then run setup-vpn.sh"
echo "Add your accounts files (.json) with the same name as the vpn in ./Microsoft-Rewards-bot"
echo "Finally run start.sh"

39
setup-linux.sh Normal file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
set -e
update_package_manager() {
if command -v apt-get &>/dev/null; then
echo "Detected APT package manager."
sudo apt-get update && sudo apt-get upgrade -y
elif command -v dnf &>/dev/null; then
echo "Detected DNF package manager."
sudo dnf update -y
elif command -v pacman &>/dev/null; then
echo "Detected Pacman package manager."
sudo pacman -Syu --noconfirm
else
echo "Unable to detect the package manager."
exit 1
fi
}
install_requirements() {
if command -v apt-get &>/dev/null; then
sudo apt install chromium chromium-driver network-manager network-manager-openvpn openvpn python3 python3-pip python3-tk xvfb git wget unzip nano -y
elif command -v dnf &>/dev/null; then
sudo dnf install chromium chromium-driver NetworkManager NetworkManager-openvpn openvpn python python*-pip python*-tkinter xorg-x11-server-Xvfb git wget unzip nano -y
elif command -v pacman &>/dev/null; then
sudo pacman -Sy chromium networkmanager networkmanager-openvpn openvpn python python-pip xorg-server-xvfb git wget unzip nano --noconfirm
fi
}
update_package_manager
install_requirements
git clone https://git.justw.tf/Lightemerald/mcr-bot && cd mcr-bot
git clone https://github.com/farshadz1997/Microsoft-Rewards-bot && cd Microsoft-Rewards-bot && git checkout 03476776e9c58029dedaeee431958b5d04364bcf && pip install -r requirements.txt
cd .. && mkdir vpn
cp ./config.txt.sample config.txt
chmod +x ./*.sh
clear
echo -e "Edit config.txt\nAdd your VPN files (.ovpn) in ./vpn\nThen run setup-vpn.sh\nAdd your accounts files (.json) with the same name as the VPN in ./Microsoft-Rewards-bot\nFinally, run start.sh"