2022-01-11 22:03:29 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
########################################################
|
|
|
|
# Installation Script for CMS Plugin for Trackerjacker #
|
|
|
|
########################################################
|
|
|
|
|
|
|
|
# Check if root
|
|
|
|
if [ "$EUID" -ne 0 ]
|
|
|
|
then echo "Please run as root"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Update OS
|
|
|
|
apt-get update
|
|
|
|
apt-get dist-upgrade --yes
|
|
|
|
|
|
|
|
# Install Python3 and additional stuff
|
2022-01-12 21:01:56 +00:00
|
|
|
apt-get install git python3-pip libopenjp2-7-dev python3-serial python3-pil --yes
|
2022-01-11 22:03:29 +00:00
|
|
|
|
|
|
|
# Remove old trackerjacker
|
|
|
|
pip3 uninstall -y trackerjacker
|
|
|
|
|
|
|
|
# Fix bug in current ubuntu
|
|
|
|
ln -s -f /usr/lib/arm-linux-gnueabihf/libc.a /usr/lib/arm-linux-gnueabihf/liblibc.a
|
|
|
|
|
|
|
|
# Get trackerjacker, add plugin and install it
|
|
|
|
cd /tmp
|
|
|
|
git clone https://github.com/calebmadrigal/trackerjacker.git
|
|
|
|
git clone https://git.chaospott.de/sirgoofy/wifi-printer.git
|
|
|
|
cp wifi-printer/cms.py trackerjacker/trackerjacker/plugins
|
|
|
|
cp wifi-printer/*.png trackerjacker/trackerjacker/plugins
|
|
|
|
|
|
|
|
pip3 install escpos
|
|
|
|
|
|
|
|
cd trackerjacker
|
2022-01-12 21:01:56 +00:00
|
|
|
python3 setup.py build
|
2022-01-11 22:03:29 +00:00
|
|
|
python3 setup.py install
|
|
|
|
|
|
|
|
|
|
|
|
# Automatically start trackerjacker on startup
|
|
|
|
cp wifi-printer/trackerjacker.sh /etc/rc.local/
|
|
|
|
chmod +x /etc/rc.local/trackerjacker.sh
|
|
|
|
|
|
|
|
reboot
|