Tiny Tiny RSS systemd Service Unit

Inspiriert von TauSys Blogeintrag Tiny Tiny RSS Update-Daemon unter systemd betreiben habe ich mein init.d Script für TT-RSS mal entfernt und durch eine systemd Service Unit ersetzt. Ganz übernehmen konnte ich Tausys Unit nicht, minimale Änderungen mussten her und nun sieht meine Unit so aus: $ cat /lib/systemd/system/ttrss.service [Unit] Description=Tiny Tiny RSS update daemon After=network.target mysql.service Requires=network.target remote-fs.target nss-lookup.target mysql.service [Service] User=www-data Group=www-data WorkingDirectory=/var/www/ttrss Type=simple StandardOutput=null StandardError=journal ExecStart=/usr/bin/php ./update_daemon2.php PrivateTmp=true InaccessibleDirectories=/home /root /boot /opt /mnt /media ReadOnlyDirectories=/etc /usr Restart=always [Install] WantedBy=multi-user.target Update 16.8.16: Service umbenannt, StandardOutput=journal, StandardError=journal, Restart=always Update 22.8.16: StandardOutput=null

September 22, 2015 · 1 Minute

logcheck Regel Update #2

Hier das zweite Update meiner logcheck Regeln. Aktuell nutze ich logcheck 1.3.17 unter Debian GNU/Linux 8. diff --git a/logcheck/ignore.d.server/amavisd-new b/logcheck/ignore.d.server/amavisd-new index fb794bd..a6121f3 100644 --- a/logcheck/ignore.d.server/amavisd-new +++ b/logcheck/ignore.d.server/amavisd-new @@ -3,5 +3,5 @@ ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ amavis\[[[:digit:]]+\]: \([-[:digit:]]+\) NOTICE: Not sending DSN in response to bulk mail from <[^.]*> containing [[:upper:] ]+, mail intentionally dropped$ ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ amavis\[[[:digit:]]+\]: \([-[:digit:]]+\) INFO: unfolded [[:digit:]]+ illegal all-whitespace continuation lines$ ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ amavis\[[[:digit:]]+\]: \([-[:digit:]]+\) WARN: address modified \((sender|recipient)\): <[^>]+> -> <[^>]+>$ -^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ amavis\[[[:digit:]]+\]: \([-[:digit:]]+\) Passed (BAD-HEADER-[[:digit:]]|UNCHECKED|CLEAN|SPAM(MY)?) {(RelayedInbound|RelayedTaggedInbound|RelayedOpenRelay|RelayedInternal)(,Quarantined)?},( LOCAL)? (\[[.[:digit:]]+\]:[[:digit:]]+ )?(\[[.:[:alnum:]]+\] )?<([._-=@[:alnum:]]+)?> -> <([._-=@[:alnum:]]+)?>,( quarantine: [._-=/@[:alnum:]]+,)? (Queue-ID: [[:alnum:]]+, )?(Message-ID: <.*>, )?mail_id: [-_[:alnum:]]+, Hits: -?[.[:xdigit:]]*, size: [[:digit:]]+, queued_as: [_[:alnum:]]+, [[:digit:]]+ ms$ +^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ amavis\[[[:digit:]]+\]: \([-[:digit:]]+\) Passed (BAD-HEADER-[[:digit:]]|UNCHECKED|CLEAN|SPAM(MY)?|UNCHECKED-ENCRYPTED) {(RelayedInbound|RelayedTaggedInbound|RelayedOpenRelay|RelayedInternal)(,Quarantined)?},( LOCAL)? (\[[.[:digit:]]+\]:[[:digit:]]+ )?(\[[.:[:alnum:]]+\] )?<([._-=@[:alnum:]]+)?> -> <([._-=@[:alnum:]]+)?>,( quarantine: [._-=/@[:alnum:]]+,)? (Queue-ID: [[:alnum:]]+, )?(Message-ID: <.*>, )?mail_id: [-_[:alnum:]]+, Hits: -?[.[:xdigit:]]*, size: [[:digit:]]+, queued_as: [_[:alnum:]]+, [[:digit:]]+ ms$ ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ amavis\[[[:digit:]]+\]: \([-[:digit:]]+\) Blocked BANNED \(.*\) {(No)?BouncedInbound,Quarantined}, (\[[.[:digit:]]+\]:[[:digit:]]+ )?(\[[.:[:alnum:]]+\] )?<([._-=@[:alnum:]]+)?> -> <([._-=@[:alnum:]]+)?>, (quarantine: [[:alnum:]]/.*, )?(Queue-ID: [[:alnum:]]+, )?(Message-ID: <[._-$%@[:alnum:]]+>, )?mail_id: [-_[:alnum:]]+, Hits: -?[.[:xdigit:]]*, size: [[:digit:]]+, (queued_as: [_[:alnum:]]+, )?[[:digit:]]+ ms$ diff --git a/logcheck/ignore.d.server/clamav-freshclam b/logcheck/ignore.d.server/clamav-freshclam index 73df35f..2608bd3 100644 --- a/logcheck/ignore.d.server/clamav-freshclam +++ b/logcheck/ignore.d.server/clamav-freshclam @@ -1,6 +1,6 @@ ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ freshclam\[[0-9]+\]: ClamAV update process started at .*$ ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ freshclam\[[0-9]+\]: Received signal: (wake up|re-opening log file)$ -^\w{3} [ :0-9]{11} [._[:alnum:]-]+ freshclam\[[0-9]+\]: (daily|main)\.c(l|v)d (is up to date|updated) \(version: [0-9]+, sigs: [0-9]+, f-level: [0-9]+, builder: \w+\)$ +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ freshclam\[[0-9]+\]: (bytecode|daily|main)\.c(l|v)d (is up to date|updated) \(version: [0-9]+, sigs: [0-9]+, f-level: [0-9]+, builder: \w+\)$ ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ freshclam\[[0-9]+\]: Clamd successfully notified about the update\.$ ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ freshclam\[[0-9]+\]: --------------------------------------$ ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ freshclam\[[0-9]+\]: Database updated \([0-9]+ signatures\) from .* \(IP: [0-9.]+\)$ diff --git a/logcheck/ignore.d.server/dovecot b/logcheck/ignore.d.server/dovecot index 643a4e4..047fb97 100644 --- a/logcheck/ignore.d.server/dovecot +++ b/logcheck/ignore.d.server/dovecot @@ -28,4 +28,5 @@ ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ dovecot: (pop3|imap)-login: (Disconnected|Aborted login)(: Inactivity)? \( ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ dovecot: imap\([-_.@[:alnum:]]+\): Disconnected ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ dovecot: lda\([-_.@[:alnum:]]+\): sieve: msgid=.*: stored mail into mailbox '[-.[:alnum:]]+'$ +^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ dovecot: lda\([-_.@[:alnum:]]+\): sieve: msgid=.*: marked message to be discarded if not explicitly delivered \(discard action\)$ ^\w{3} [ :[:digit:]]{11} [._[:alnum:]-]+ dovecot: auth-worker\([-_.[:alnum:]]+\): (pg|my)sql\([.:[:xdigit:]]+\): Connected to database [-_.[:alnum:]]+$ diff --git a/logcheck/ignore.d.server/apache b/logcheck/ignore.d.server/apache index 9faac7e..040caa2 100644 --- a/logcheck/ignore.d.server/apache +++ b/logcheck/ignore.d.server/apache @@ -1 +1,2 @@ ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ apache: nss_ldap: reconnect(ing|ed) to LDAP server(\.\.\.| after [0-9]+ attempt\(s\))$ +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ apache2\[[0-9]+\]: Reloading web server: apache2.$ diff --git a/logcheck/ignore.d.server/rsyslog b/logcheck/ignore.d.server/rsyslog index 171f20e..594b869 100644 --- a/logcheck/ignore.d.server/rsyslog +++ b/logcheck/ignore.d.server/rsyslog @@ -3,3 +3,5 @@ ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ rsyslogd: \[origin software="rsyslogd" swVersion="[0-9.]+" x-pid="[0-9]+" x-info="http://www.rsyslog.com"\] start$ ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ rsyslogd: \[origin software="rsyslogd" swVersion="[0-9.]+" x-pid="[0-9]+" x-info="http://www.rsyslog.com"\] exiting on signal [0-9]+.$ ^\w{3} [ :0-9]{11} [._[:alnum:]-]+ rsyslogd: \[origin software="rsyslogd" swVersion="[0-9.]+" x-pid="[0-9]+" x-info="http://www.rsyslog.com"\] rsyslogd was HUPed$ +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ rsyslogd(-)?[0-9]+: action 'action 17' resumed \(module 'builtin:ompipe'\) \[try http://www.rsyslog.com/e/[0-9]+ \]$ +^\w{3} [ :0-9]{11} [._[:alnum:]-]+ rsyslogd(-)?[0-9]+: action 'action 17' suspended, next retry is \w{3} \w{3} [ :0-9]{16} \[try http://www.rsyslog.com/e/[0-9]+ \]$ Neu hinzugekommen ist eine Datei für systemd und systemd-login mit dem folgenden Inhalt: ...

August 9, 2015 · 3 Minuten

Grub ohne automatische Gruppierungen

Man kann in Grub die automatische Gruppierung von Einträgen in der Liste abschalten. Daraufhin hat man dann keinerlei Untermenüs mehr und direkt alle möglichen Einträge in der Liste. Das geht mit der folgenden Zeile in der /etc/default/grub: GRUB_DISABLE_SUBMENU=y Abschließend noch die grub.cfg neu generieren: $ sudo grub-mkconfig -o /boot/grub/grub.cfg

August 4, 2015 · 1 Minute

Migration nach Hugo startet

Tag 1 Heute beginne ich mit der Migration von Wordpress nach Hugo. Die alten Posts, die ich mit Wordpress erstellt habe, würde ich gerne übernehmen und auch die Links sollen dabei intakt bleiben. Mal sehen, wie das gehen wird. Tag 2 https://github.com/SchumacherFM/wordpress-to-hugo-exporter Ein paar automatisierte Änderungen mit sed und ein paar händische Änderungen weiter sind nun die alten Blogeinträge migriert. Tag 3 Die Bilder in den Beiträgen sind nun auch migriert. Ebenso werden nun Codeausschnitte farblich hervorgehoben. Tag 4 Die Standardfeedurl von Hugo kann man auch ändern, indem man die Variable rssUri anpasst. Damit ist die Migration der Inhalte soweit abgeschlossen. Jetzt muss ich mir nur noch das Theme basteln, sodass es einigermaßen aussieht.

Juli 9, 2015 · 1 Minute

XBMC/Kodi: Fehler in ArtworkRotationThread [Erno-2] Name or service not known

Nach dem Hochfahren von Raspbmc erhielt ich breits in der XBMC 13-er Version sowie auch in der 14-er, nach dem Update auf Kodi, immer noch folgendes Popup mit der Fehlermeldung: Fehler in ArtworkRotationThread [Erno-2] Name or service not known Weiterhin gab es immer wieder Notifications in der rechten unteren Ecke bzgl. fehlgeschlagener Serververbindungen, die aber nach einiger Zeit verschwinden. Da man die immer wegdrücken muss und das ziemlich nervig ist, habe ich nach einer Lösung des Problems gesucht. Im Logfile, in ~/.kodi/temp/kodi.log sah das ganze so aus, was wohl nur die verschwindenen Notifications in der Ecke unten rechts beschreibt: 18:21:21 T:2903905344 NOTICE: ===== XBMB3C START ===== 18:21:21 T:2903905344 NOTICE: XBMB3C -> running Python: sys.version_info(major=2, minor=7, micro=3, releaselevel='final', serial=0) 18:21:21 T:2903905344 NOTICE: XBMB3C -> running XBMB3C: 0.9.764 18:21:21 T:2903905344 NOTICE: 14.0 Git:2014-12-24-e044d5a-dirty 18:21:21 T:2903905344 NOTICE: XBMB3C -> Platform: Linux/RPi 18:21:21 T:2903905344 NOTICE: XBMB3C -> LogLevel: 0 18:21:21 T:2903905344 NOTICE: XBMB3C 0 -> Version : 14.0 - {u'major': 14, u'tag': u'stable', u'minor': 0, u'revision': u'2014-12-24-e044d5a-dirty'} 18:21:21 T:2903905344 NOTICE: XBMB3C 1 -> XBMB3C Connection Manager Called 18:21:21 T:2903905344 NOTICE: XBMB3C 1 -> Getting Server Details from Network 18:21:21 T:2903905344 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<-- - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS! Error Type: <type 'exceptions.NameError'> Error Contents: global name 'socket' is not defined Traceback (most recent call last): File "/home/pi/.kodi/addons/plugin.video.xbmb3c/default.py", line 39, in <module> MainModule.MainEntryPoint() File "/home/pi/.kodi/addons/plugin.video.xbmb3c/resources/lib/MainModule.py", line 1621, in MainEntryPoint ConnectionManager().checkServer() File "/home/pi/.kodi/addons/plugin.video.xbmb3c/resources/lib/ConnectionManager.py", line 51, in checkServer serverInfo = self.getServerDetails() File "/home/pi/.kodi/addons/plugin.video.xbmb3c/resources/lib/ConnectionManager.py", line 117, in getServerDetails sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) NameError: global name 'socket' is not defined -->End of Python script error report<-- 18:21:22 T:2903905344 WARNING: CPythonInvoker(7, /home/pi/.kodi/addons/plugin.video.xbmb3c/default.py): the python script "/home/pi/.kodi/addons/plugin.video.xbmb3c/default.py" has left several classes in memory that we couldn't clean up. The classes include: N9XBMCAddon9xbmcaddon5AddonE 18:21:22 T:3038625792 ERROR: GetDirectory - Error getting plugin://plugin.video.xbmb3c/?content_type=video 18:21:22 T:3038625792 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.video.xbmb3c/?content_type=video) failed 18:21:22 T:2903905344 NOTICE: Thread BackgroundLoader start, auto delete: false 18:21:25 T:2903905344 NOTICE: Thread LanguageInvoker start, auto delete: false 18:21:25 T:2903905344 NOTICE: -->Python Interpreter Initialized<-- Durch ein bisschen googlen kommt man dann u.a. auf diese Seite: ...

Januar 5, 2015 · 2 Minuten