wifi-printer/install.sh

46 lines
1.1 KiB
Bash
Raw Normal View History

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
apt-get install python3-pip libopenjp2-7-dev python3-serial python3-pil --yes
# 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
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