parent
e3447e6675
commit
cf76bdcb44
4 changed files with 76 additions and 21 deletions
@ -1,25 +1,46 @@ |
||||
#!/bin/sh -e |
||||
# |
||||
# rc.local |
||||
# |
||||
# This script is executed at the end of each multiuser runlevel. |
||||
# Make sure that the script will "exit 0" on success or any other |
||||
# value on error. |
||||
# |
||||
# In order to enable or disable this script just change the execution |
||||
# bits. |
||||
# |
||||
# By default this script does nothing. |
||||
|
||||
# Print the IP address |
||||
_IP=$(hostname -I) || true |
||||
if [ "$_IP" ]; then |
||||
printf "My IP address is %s\n" "$_IP" |
||||
#!/bin/bash |
||||
|
||||
######################################################## |
||||
# Installation Script for CMS Plugin for Trackerjacker # |
||||
######################################################## |
||||
|
||||
# Check if root |
||||
if [ "$EUID" -ne 0 ] |
||||
then echo "Please run as root" |
||||
exit |
||||
fi |
||||
|
||||
|
||||
# Run trackerjacker with cms plugin in background |
||||
trackerjacker -i wlan0 --trigger-plugin cms --track & |
||||
# Update OS |
||||
apt-get update |
||||
apt-get dist-upgrade --yes |
||||
|
||||
# Install Python3 and additional stuff |
||||
apt-get install git 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 |
||||
|
||||
pip3 install escpos |
||||
|
||||
cd trackerjacker |
||||
python3 setup.py build |
||||
python3 setup.py install |
||||
|
||||
# Copy image files to installed plugin because this is not done automatically |
||||
cp wifi-printer/*.png /usr/local/lib/python3.9/dist-packages/trackerjacker-1.9.0-py3.9.egg/trackerjacker/plugins/ |
||||
|
||||
# Automatically start trackerjacker on startup |
||||
cp -f wifi-printer/rc.local.new /etc/rc.local |
||||
chmod +x /etc/rc.local |
||||
|
||||
exit 0 |
||||
reboot |
||||
|
@ -0,0 +1,25 @@ |
||||
#!/bin/sh -e |
||||
# |
||||
# rc.local |
||||
# |
||||
# This script is executed at the end of each multiuser runlevel. |
||||
# Make sure that the script will "exit 0" on success or any other |
||||
# value on error. |
||||
# |
||||
# In order to enable or disable this script just change the execution |
||||
# bits. |
||||
# |
||||
# By default this script does nothing. |
||||
|
||||
# Print the IP address |
||||
_IP=$(hostname -I) || true |
||||
if [ "$_IP" ]; then |
||||
printf "My IP address is %s\n" "$_IP" |
||||
fi |
||||
|
||||
|
||||
# Run trackerjacker with cms plugin in background |
||||
trackerjacker -i wlan0 --trigger-plugin cms --track & |
||||
|
||||
|
||||
exit 0 |
@ -0,0 +1,8 @@ |
||||
country=DE |
||||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev |
||||
update_config=1 |
||||
|
||||
network={ |
||||
ssid="Freifunk" |
||||
key_mgmt=NONE |
||||
} |
Loading…
Reference in new issue