Debian: dmesg output contains Error: Driver 'pcspkr' is already registered, aborting…

Well, I recently prepared a bunch of Debian KVM guests, and today I got annoyed (basically because logwatch complains about it …) by this pesky error message on each startup. What causes this is error is really simple. Udev loads the PC speaker driver (pcspkr) and then (for whatever reason) tries to load the alsa-module for the PC speaker (snd_pcsp). And the second one, basically fails. All we need to do, is create a blacklist.conf and add the latter one to it. ...

February 28, 2017 · 1 min · 91 words · christian

Tiny Tiny RSS init-script for multiple instances on Debian Wheezy

Well, I have a bunch of Tiny Tiny RSS instances running on my webhost, and I wanted a init-script that starts the update-daemons for all instances. Now, there’s already a bunch of init scripts for Debian around ( 1, 2) however none of them were to my liking or did what I wanted it to do. So I ended up (yeah, I know again) rewriting them. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 #!/bin/sh ### BEGIN INIT INFO # Provides: ttrss # Required-Start: $local_fs $remote_fs networking # Required-Stop: $local_fs $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Tiny Tiny RSS update daemon # Description: Update the Tiny Tiny RSS subscribed syndication feeds. ### END INIT INFO set -e PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="Tiny Tiny RSS update daemon" NAME=$(command basename "${0}") DISABLED=1 FORKING=0 # Read configuration variable file if it is present [ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}" DAEMON_SCRIPT="update.php --daemon" if [ $FORKING -ne 0 ] ; then DAEMON_SCRIPT="update_daemon2.php" fi DAEMON=/usr/bin/php # Exit if the package is not installed [ -x "$DAEMON" ] || exit 0 [ -d "${TTRSS_PATH}" ] || exit 0 # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions if [ "$DISABLED" != "0" -a "$1" != "stop" ]; then log_warning_msg "Not starting $DESC - edit /etc/default/tt-rss and change DISABLED to be 0."; exit 0; fi # Function that starts the daemon/service do_start() { for dir in ${TTRSS_PATH}/*; do INSTANCE_NAME=${dir##*/} start-stop-daemon --start --make-pidfile --background --quiet --chuid "${TTRSS_USERID}" --group "${TTRSS_GROUPID}" --chdir "${dir}" --pidfile "${TTRSS_PIDDIR}/ttrss-${INSTANCE_NAME}.pid" --exec "${DAEMON}" --test >/dev/null || return 1 start-stop-daemon --start --make-pidfile --background --quiet --chuid "${TTRSS_USERID}" --group "${TTRSS_GROUPID}" --chdir "${dir}" --pidfile "${TTRSS_PIDDIR}/ttrss-${INSTANCE_NAME}.pid" --exec "${DAEMON}" -- ${dir}/${DAEMON_SCRIPT} --log /var/log/ttrss/${INSTANCE_NAME}.log || return 2 done } # Function that stops the daemon/service do_stop() { for dir in ${TTRSS_PATH}/*; do INSTANCE_NAME=${dir##*/} start-stop-daemon --stop --make-pidfile --quiet --retry=TERM/1/KILL/5 --pidfile "${TTRSS_PIDDIR}/ttrss-${INSTANCE_NAME}.pid" RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 start-stop-daemon --stop --quiet --oknodo --retry=0/1/KILL/5 --exec ${DAEMON} [ "$?" = 2 ] && return 2 rm -f "${TTRSS_PIDDIR}/ttrss-${INSTANCE_NAME}.pid" return $RETVAL done } case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" do_start case "$?" in 0|1) log_end_msg 0 ;; 2) log_end_msg 1 ;; esac ;; stop) log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) log_end_msg 0 ;; 2) log_end_msg 1 ;; esac ;; restart|force-reload) # If the "reload" option is implemented then remove the # 'force-reload' alias log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2 exit 3 ;; esac : 1 2 3 4 5 6 7 8 9 10 11 12 # Set DISABLED to 1 to prevent the daemon from starting. DISABLED=0 TTRSS_USERID="www-data" TTRSS_GROUPID="www-data" TTRSS_PIDDIR="/var/run" TTRSS_PATH="/var/www/rss.heimdaheim.de/www" # Allow the update_daemon script to use a forking daemon instead of a # single-threaded instance. # This option is only available for TinyTinyRSS 1.2.20 and above. FORKING=0

February 9, 2015 · 4 min · 651 words · christian

Linux NAS optimizations

Well, I recently had to flatten my archive NAS (well only the OS part … wheeeh). Since I didn’t have the chance to backup the old settings I had to do everything from scratch … And this time I decided, I wasn’t doing a script but rather the proper way. I spent a while reading through the Internetz about the various settings until I stumbled upon a Frauenhofer Wiki entry. From there I ended up writing those udev-rules and the sysctl configs… ...

July 9, 2014 · 4 min · 685 words · christian

sa-learn, dovecot virtual users and virtual user configs

Well, I wanted independent SpamAssassin Bayes databases per user (different users, different preferences). For that, RoundCube already set up the Junk folder. However, I wanted the ability (for myself, as well for my other users) to individually mark messages as either Spam or Ham. RoundCube: Inbox view Now, as I said before I wanted a trivial way to mark messages as Spam or Ham (without using the command line each time). ...

December 23, 2013 · 4 min · 746 words · christian

open-vm-tools for Debian Etch

Well, after a loooong time of trying to get the modules and all the other stuff (read: init-script for the guest daemon and modules) working, I think I’m about there. I finally fixed a long-standing issue, with the postinst/prerm scripts, and the tools should be about ready. Gonna try and send it Daniel Baumann’s way (that is the Debian Maintainer), for proper inclusion into Lenny. I (successfully) tried splitting the Xorg parts from the " normal" open-vm-tools, as I usually don’t want Xorg installed on any of my virtual machines. Thus leaving me with open-vm-tools, open-vm-modules and open-vm-toolbox (and open-vm-source) as a list of packages one could install.

April 20, 2008 · 1 min · 108 words · christian

Nagios undamp; plugins

Since we started utilizing Nagios’s power two months ago, I finally came up with a C-based ram-plugin for nagios. The biggest problem I had with the python and perl based plugins, that some distributions (yes, SLES and Debian) don’t install either Python or Perl. Since I wanted a manageable setup (as in unified code base across all distributions), I wanted it to work without installing too much. So I took the swap plugin and basically removed what wasn’t necessary and voila! ...

October 6, 2007 · 1 min · 115 words · christian

Being oblivious

Well, the title nearly says everything .. I managed to loose my second pair of car keys, today I somehow found out that I was driving without a drivers license, so I have to go to the registration office and apply for a new one, hopefully should be done in about 4-6 weeks. Oh hell, and I have to spend about 40 € on it .. Well, live kinda sucks if you’re oblivious. Anyway, work is giving me a ass-load of fun right now, so I’m kinda happy, though it’s Saturday evening, I’m sitting back home, just lost all my custom build Debian packages (yes, I happen to use that at work, right after SLES) and listening to Hed PE.

September 8, 2007 · 1 min · 120 words · christian