Browse Source

Changes in printer output and configuration

master
Sebastian 1 week ago
parent
commit
07ab300538
3 changed files with 29 additions and 7 deletions
  1. +1
    -1
      cms.py
  2. +4
    -3
      install.sh
  3. +24
    -3
      rc.local

+ 1
- 1
cms.py View File

@ -67,7 +67,7 @@ class Trigger:
.format(dev_id, vendor, vendor, self.manufacturer_to_count[vendor]))
# Output on printer
self.p.text('Ger\20\204\04t: {}\nHersteller: {}\n\n'.format(dev_id, vendor))
self.p.text('Adresse: {}\n{}\n\n'.format(dev_id, vendor))
# Print each n packets a summary


+ 4
- 3
install.sh View File

@ -29,7 +29,6 @@ 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
@ -37,9 +36,11 @@ 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 wifi-printer/trackerjacker.sh /etc/rc.local/
chmod +x /etc/rc.local/trackerjacker.sh
cp -f wifi-printer/trackerjacker.sh /etc/rc.local
chmod +x /etc/rc.local
reboot

+ 24
- 3
rc.local View File

@ -1,4 +1,25 @@
#!/bin/bash
#!/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.
# Run trackerjacker with cms plugin
trackerjacker -i wlan1 --trigger-plugin cms --track
# 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

Loading…
Cancel
Save