Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

Commit

Permalink
Created installer script for easier installation
Browse files Browse the repository at this point in the history
  • Loading branch information
jxstxn__ authored and jxstxn__ committed Mar 20, 2021
1 parent 714ca30 commit d711481
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions installer.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/bash

# prints colored text
print_style () {

if [ "$2" == "info" ] ; then
COLOR="96m";
elif [ "$2" == "success" ] ; then
COLOR="92m";
elif [ "$2" == "warning" ] ; then
COLOR="93m";
else #default color
COLOR="0m";
fi

STARTCOLOR="\e[$COLOR";
ENDCOLOR="\e[0m";

printf "$STARTCOLOR%b$ENDCOLOR" "$1";
}

print_style "installing dependencies\n" "info";
sudo apt-get install openjdk-8-jdk -y & sudo apt-get install wiringpi -y & sudo apt-get install screen -y & sudo apt-get install git -y
sleep 2
print_style "Installing RaspiOpener and AliveKeeper\n" "info";
mkdir opener
cd opener
wget https://github.com/Kreck-Projekt/RaspiOpener/releases/download/1.0/RaspiOpener.jar
sleep 2
wget https://github.com/Kreck-Projekt/AliveKeeper/releases/download/1.0/AliveKeeper.jar
sleep 2
print_style "modify executable\n" "info";
sudo chmod -755 AliveKeeper.jar
sudo chmod -755 RaspiOpener.jar
print_style "Warning: A reboot is recommended." "warning";
print_style "Warning: After a reboot you must redo the step below, you can avoid this by adding the AliveKeeper to the autostart\n" "warning";
print_style "now open a new screen with 'screen -S opener' and start the AliveKeeper 'sudo java -jar AliveKeeper.jar'\n" "success";

0 comments on commit d711481

Please sign in to comment.