Bash legacy

Aktuelle ipv6 grep en und in conferierst einsetzten





# antoschnow=`ping6 antosch6.dyndns.tv -c 1 | awk 'NR==2 {print substr($4, 0, length($4)-22)}'`
# antoschnow="$antoschnow""$identifier"

antoschnow=`grep -v "^f" /home/antosch/ipv6.txt | sed 's/.\{3\}$//'`

if [ "$antoschip6" != "$antoschnow" ]; then
sed -i s/"$antoschip6"/"$antoschnow"/g "$config"
echo "$antoschnow" > "$ip6"
/etc/init.d/apache2 restart 1> /dev/null

Linux neu auf der console – legacy alternative

journalctl -f

mein ffmpeg VHS => mp4

ffmpeg -i $INPUT -vf "crop=688:552:12:10, yadif=1:-1:0, scale=734:552, hqdn3d, setdar=4/3" -c:v libx264 -crf 16 -r 50 -c:a aac -b:a 192k OUTPUT

ffmpeg -ss 00:00:10 -i $INPUT -frames 1 -vf "select=not(mod(n\,2400)),scale=480:360,tile=4x3" $OUTPUT.png
IFS=$'\n'; for mp3 in $(ls *.png); do ffmpeg -i $mp3 -vf scale=800:-1 -f jpg ${mp3}.jpg; done

AMD 570 Energie Fan Performance

cat /sys/kernel/debug/dri/0/amdgpu_pm_info

watch -n1 -d 'sensors'

console list dhcp leases

You may use the arp-table, or DHCP-leases. Not a perfect solution, maybe it’s enough?

List arp-table


List DHCP-leases

cat /tmp/dhcp.leases

… and combined

for ip in $(arp | grep -v IP | awk '{print $1}'); do 
    grep $ip /tmp/dhcp.leases; 


Ubuntu redo apt

To clone your system to another system. Or make a backup. In terminal type:

dpkg --get-selections | grep -v deinstall > ubuntu-files

This command makes a file list of all installed packages in your system (and stores it in present working directory). Backup this file in hdd, email, etc…(this file is very small).

In the freshly installed ubuntu system run:

sudo dpkg --set-selections <./ubuntu-files (will set it up and)

apt-get -y update
apt-get dselect-upgrade

This will install only those packages you had installed (with apt-get) in the old system.


You could back up all the .deb packages from /var/cache/apt/archives/ and install them manually using:

dpkg -i *.deb

And after that running an update cycle later.

ssl lets encrypt mit plex

von https://forums.plex.tv/t/add-custom-ssl-certs-now-available-for-everyone-how-to/128684/2

I’m not familiar with pkcs#12.

PKCS#12 is an archive file format, in this case used to bundle your private key and certificates.

I however have been using Letsencrypt to get my free signed ssl certs for all my standalone and apache web servers. How can I use does certs in Plex?
Edit: Available cert files from Letsencrypt: cert.pem chain.pem fullchain.pem privkey.pem

You’ll have to create a .pfx file (the PKCS#12 archive) containing both the private key and certificates of your chain. This is done using OpenSSL commands in your terminal:

openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out archive.pfx -name "Name for Archive"

You’ll be prompted for a password, this password has to be filled in the Plex’ ‘Custom certificate encryption key’ field. I’m not sure if you had to password protect your private key upon Let’s Encrypt setup, you might be prompted for that as well.

After you’be obtained the .pfx file, store it on your media server computer (e.g. C:\SSL\archive.pfx). Then, occupy the ‘Custom certificate path’ field with the path to the file (C:\SSL\archive.pfx).

Last but not least, fill in the domain the certificate has been created for (e.g. plex.example.com 13).

A quick tip: in the ‘Remote Access’ setting, manually specify port 443 and update your router to point 443 external to 32400 internal. Then, for ‘Custom server access URLs’, fill in: https://plex.example.com:443 8.

You can now visit your custom SSL secured Plex domain using https://plex.example.com. Plex will do the rest. Try testing the domain outside your network the Plex server is hosted in, it might not work accessing the domain internally.

henkieraniDec ’15

I forgot to mention here:

Last but not least, fill in the domain the certificate has been created for (e.g. plex.example.com 7).
That was ment for the ‘Custom certificate domain’ field.

OpenWRT VLAN – Telekom Netzumschaltung BNG


qnap apache log

This is a quick guide for those needing to debug web apps, such as ownCloud, on QNAP hardware.

von: http://technedigitale.com/archives/407

QNAP systems only come with an Apache error log by default, which only logs apache service errors, not page errors, which make impossible to debug problems on sites. The only way to get more detailed logs is to add a few new config files to Apache, as follows:

  1. Login to the QNAP device through SSH
  2. Enable .htaccess usage on Apache. To do this you need to create a new Apache configuration file:
    vi /etc/config/apache/extra/apache-myconfig.conf

    And add the following commands:

    CustomLog logs/main_log combined
    ErrorLog logs/error_log
    LogLevel info
  3. Reference this new configuration file on Apache main configuration file. To do this, edit Apache configuration file:
    vi /etc/config/apache/apache.conf

    and add the following line at the end of the file:

    Include /etc/config/apache/extra/apache-myconfig.conf

Finally, restart Apache.

 /etc/init.d/Qthttpd.sh restart

Now, this own’t work on QNAP running QTS 4.1.x onwards, as people from QNAP thought it was working far too good, and decided to through a challenge. For some reason, Apache configuration files are reset every time Apache is restarted by Qnap startup scripts. So until I get a stable solution, the workaround is to manually restart Apache:

/usr/local/apache/bin/apachectl restart

The files will be present on /mnt/ext/opt/apache/logs/ .

Please note, all files will be restarted at 0:00, in order not to fill the partion .

ffmpeg Hörbuch

ganzen Ordner mit Metadaten & Cover

IFS=$'\n'; for mp3 in $(ls *.mp3); do ffmpeg -i $mp3 -metadata artist="Reihentitel" -metadata title="021 - Erstes Buch"  -metadata album="001 - Erstes Buch" -map 0:0 -acodec aac -b:a 128k -f mp4 ${mp3}.m4b; MP4Box -itags cover=folder.jpg ${mp3}.m4b; done

und das Cover nachträglich

IFS=$'\n'; for m4b in $(ls *.m4b); do MP4Box -itags cover=folder.jpg ${m4b}; done

und das Cover aus nem mp3 extrahieren

-vcodec png

© 2021 messi

Theme von Anders NorénNach oben ↑