diff --git a/README.md b/README.md index b6579e4..81bbff8 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,14 @@ Mikubot V2 ist freie Software; du darfst ihn modifizieren und weiterverbreiten, ### Ubuntu und Debian Falls du Ubuntu oder Debian verwendest, kannst du einfach `./install-dependencies.sh` ausführen, damit alles installiert wird. Ergänze dann noch den `bot_api_key` und die `admin`-ID (Bekommst du in Telegram mit `@Mikubot id`) und kopiere die config.lua.example nach config.lua. +###Optionale Pakete +Diese Pakete werden für `flip-text.lua`, `shell.lua`, `speedtest_cli.lua` und `youtube_dl.lua` benötigt. +```sudo apt-get install -y cowsay scrot fswebcam vnstat vnstati youtube-dl npm +sudo npm install -g flip-text +wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py +chmod +x speedtest-cli +sudo mv speedtest-cli /usr/local/bin/speedtest-cli``` + Für eine manuelle Installation musst du LuaRocks für 5.2 [selbst kompilieren](http://stackoverflow.com/a/20359102). ### Setup diff --git a/miku/plugins/shell.lua b/miku/plugins/shell.lua index 17efc78..d3939f6 100644 --- a/miku/plugins/shell.lua +++ b/miku/plugins/shell.lua @@ -78,7 +78,8 @@ function shell:action(msg, config, matches) -- Requires vnstat & vnstati (sudo apt-get install vnstat vnstati) if msg.text:match('^/[Tt][Rr][Aa][Ff][Ff][Ii][Cc]$') then - run_command("vnstati -m -vs -i enp2s0 -o /tmp/vnstat.png") + local network = 'enp2s0' -- You can see your network with "ifconfig" in an terminal + run_command("vnstati -m -vs -i "..network.." -o /tmp/vnstat.png") utilities.send_photo(msg.chat.id, '/tmp/vnstat.png', nil, msg.message_id) return end