This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by iptables-save v1.8.4 on Wed Apr 29 21:11:26 2020 | |
*filter | |
:INPUT ACCEPT [17750:9299587] | |
:FORWARD DROP [290:18976] | |
:OUTPUT ACCEPT [19734:2075193] | |
:DOCKER - [0:0] | |
:DOCKER-ISOLATION-STAGE-1 - [0:0] | |
:DOCKER-ISOLATION-STAGE-2 - [0:0] | |
:DOCKER-USER - [0:0] | |
[290:18976] -A FORWARD -j DOCKER-USER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kernel IP routing table | |
Destination Gateway Genmask Flags Metric Ref Use Iface | |
default 192.168.2.2 0.0.0.0 UG 0 0 0 rndis0 | |
192.168.2.0 * 255.255.255.0 U 0 0 0 rndis0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loop_through_tty { | |
log_path="$HOME/logs" | |
if [ ! -d "$log_path" ]; then | |
mkdir $log_path | |
fi | |
while true | |
do | |
for i in $(find /dev/ |grep ttyUSB); do | |
if [[ -z $(ps fax |grep picocom |grep $i |grep -v grep) ]]; then | |
screen picocom -b 115200 -l $i --logfile $log_path/picocom${i##*/}.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo systemctl status tty-observer.service | |
● tty-observer.service - "Script looks for ttys and starts picocom for each tty" | |
Loaded: loaded (/etc/systemd/system/tty-observer.service; enabled; vendor preset: enabled) | |
Active: active (running) since Fri 2020-04-03 14:30:40 CEST; 6s ago | |
Process: 919 ExecStart=/usr/bin/screen -S picocom -d -m /usr/bin/start_picocom.sh (code=exited, status=0/SUCCESS) | |
Main PID: 920 (screen) | |
Tasks: 3 (limit: 4915) | |
Memory: 2.1M | |
CGroup: /system.slice/tty-observer.service | |
├─920 /usr/bin/SCREEN -S picocom -d -m /usr/bin/start_picocom.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat /etc/systemd/system/tty-observer.service | |
[Unit] | |
Description="Script looks for ttys and starts picocom for each tty" | |
[Service] | |
Type=forking | |
ExecStart=screen -S picocom -d -m /usr/bin/start_picocom.sh | |
[Install] | |
WantedBy=multi-user.target | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## We start picocom every boot | |
function prepare_crontab { | |
crontab_path="/var/spool/cron/crontabs" | |
sudo echo "@reboot $HOME/work/start_picocom.sh" > "$crontab_path/$USER" | |
sudo chown "$USER:crontab" $crontab_path/$USER | |
sudo chmod 600 $crontab_path/$USER | |
} | |
prepare_crontab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function loop_through_tty { | |
log_path="$HOME/logs" | |
if [ ! -d "$log_path" ]; then | |
mkdir $log_path | |
fi | |
while true | |
do | |
mapfile -t ttys_path < <(find /dev/ -name "ttyUSB*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compress | |
"/home/frojnd/picocom/picocomttyUSB*" { | |
rotate 14 | |
dateext | |
daily | |
#size 10K | |
#copytruncate | |
postrotate | |
/home/frojnd/work/picocom_postrotate.sh | |
endscript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash, | |
awk, base64, basename, beep, blkid, blockdev, bootchartd, brctl, | |
bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod, | |
chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, | |
conspy, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd, | |
deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff, | |
dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap, | |
dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake, | |
expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat, | |
fdisk, fgconsole, fgrep, find, findfs, flock, fold, free, freeramdisk, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asar | |
gconf | |
jq | |
libmagick6 | |
python-brotlipy | |
python-flask-htmlmin | |
python-more-itertools | |
python2-more-itertools |
NewerOlder