aboutsummaryrefslogtreecommitdiff
path: root/monitor/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'monitor/install.sh')
-rwxr-xr-xmonitor/install.sh26
1 files changed, 8 insertions, 18 deletions
diff --git a/monitor/install.sh b/monitor/install.sh
index 7f503a5..beceec4 100755
--- a/monitor/install.sh
+++ b/monitor/install.sh
@@ -15,7 +15,7 @@
# Full path
BASE=$(readlink -fn -- "$0")
BASE=$(dirname "$BASE")
-if [ ! -x "$BASE/bot-status" ]; then
+if [ ! -x "$BASE/bot-status.py" ]; then
echo "Make sure the install script is in the monitor directory"
exit 1
fi
@@ -42,29 +42,19 @@ if [ $MANY -eq 1 ]; then
JSON=""
fi
-# Checking for required Perl modules
-if ! perl -v > /dev/null; then
- echo "Please, install Perl"
- exit 1
-fi
-if ! perl -e "File::Temp" > /dev/null; then
- echo "Please, install Perl's File module"
- exit 1
+# Checking for required Python3 modules
+if ! python3 --version > /dev/null; then
+ echo 'Python3 missing'
fi
-if ! perl -e "use JSON" > /dev/null; then
- echo "Please, install Perl's JSON module"
- exit 1
-fi
-if ! perl -e "use LWP" > /dev/null; then
- echo "Please, install Perl's LWP module"
- exit 1
+if ! python3 -c 'import requests' > /dev/null; then
+ echo 'python3-requests module missing'
fi
############################# Install
# Creates bin for bot-status
mkdir -p "$ROOT/bin"
-ln -sf "$BASE/bot-status" "$ROOT/bin/bot-status"
+ln -sf "$BASE/bot-status.py" "$ROOT/bin/bot-status.py"
if [ "$JSON" != "" ]; then
ln -sf "$BASE/$JSON" "$ROOT/bin/$JSON"
fi
@@ -99,5 +89,5 @@ echo
# Crontab
echo " * To run the application every five minutes, add this line to your crontab:"
-echo " */5 * * * * $ROOT/bin/bot-status $ROOT/bin/$JSON $ROOT/html/index.html"
+echo " */5 * * * * $ROOT/bin/bot-status.py $ROOT/bin/$JSON $ROOT/html/index.html"
echo