Assumption 1: You have Raspbian (with or without GUI) installed on a Raspberry Pi and have access with SSH and SFTP if no GUI installed or headless (or you are comfortable managing files using the terminal).
Assumption 2: You have created and have access to your Acc.ini file containing all your account settings. Usually, run the MFBot.exe bot on your Windows machine and setup your accounts, so in the end the Acc.ini file is created or updated.
Assumption 3: If asked, confirm every action during this guide.
Spoiler: I used "sudo" on some commands even if not needed to avoid some people with little experience on terminal commands, asking why the commands do not work. Also, I chose to create a service to run the bot because I found other methods not working well or not on all platforms. I created this guide because I wanted most of the Information needed to run MFBot on Raspbian to exist in one place and couldn't find it anywhere. Finally and obviously, this guide is working in the time of writing it and I am not responsible if something goes wrong or if something breaks.
Guide:
On Terminal (with GUI) / With SSH (Putty on Windows, without GUI)
- Update the OS with: and
Code: Alles auswählen
sudo apt-get update
and accepting by typing "y" when neededCode: Alles auswählen
sudo apt-get upgrade
- Install MFBot to Raspberry with:
Code: Alles auswählen
wget http://www.mfbot.de/Download/latest/MFBot_Konsole_ARMRasp
- Install Mono environment with:
Code: Alles auswählen
sudo apt-get install mono-runtime
- Navigate to: /home/pi/
- Make sure the file exists: "MFBot_Konsole_ARMRasp"
- Create a safe folder (ex.): "MFBot"
- Move the file: "MFBot_Konsole_ARMRasp" to the created folder
- Take the file "Acc.ini" containing your account settings and place it inside the created folder
- Make sure that the created folder: "/home/pi/MFBot/" contains the files "MFBot_Konsole_ARMRasp" and "Acc.ini"
- Go to the created folder:
Code: Alles auswählen
cd /home/pi/MFBot/
- Make the bot executable with the command:
Code: Alles auswählen
chmod a+x MFBot_Konsole_ARMRasp
- Make sure it runs with:
Code: Alles auswählen
./MFBot_Konsole_ARMRasp
- To stop the bot type:
Code: Alles auswählen
exit
To add the run command on startup with a service, create a file "mfb.service" on "/home/pi/MFBot/" with the following contents:
Code: Alles auswählen
[Unit]
Description=MFBot Daemon
After=network.target
Requires=network.target
[Service]
User=pi
Group=pi
Type=simple
WorkingDirectory=/home/pi/MFBot
ExecStart=/home/pi/MFBot/MFBot_Konsole_ARMRasp
Restart=always
[Install]
WantedBy = multi-user.target
On Terminal (with GUI) / With SSH (Putty on Windows, without GUI)
- If not already there, navigate to "/home/pi/MFBot/" using:
Code: Alles auswählen
cd /home/pi/MFBot/
- Copy the file to /etc/systemd/system/ using:
Code: Alles auswählen
sudo cp mfb.service /etc/systemd/system/mfb.service
- To check the service, start it with: [/code]sudo systemctl start mfb.service [/code]
- Check if the bot is running, doing stuff in your account/accounts etc.
- And stop the service with:
Code: Alles auswählen
sudo systemctl stop mfb.service
- When you confirmed everything works, enable the service to run on startup with:
Code: Alles auswählen
sudo systemctl enable mfb.service
- And reboot to test it with:
Code: Alles auswählen
sudo reboot