Bug#1055771: sysvinit script corrections
On 17.03.2024 20:24, Jonas Smedegaard wrote: It would be helful if you could double-check using newest package and with*only* the init script change, leaving all other settings at their defaults and with no prior Radicale-related files created on the system - and then check if the logging works as intended. I'm not totally certain what you mean by that. Here is what I think. Using a fresh install, install radicale and only add the logging part to the initscript or the $dir part, too? Without any changes in /etc/radicale. (tha is the 5-minute install from the radicale website). greets Frank
Bug#1055771: sysvinit script corrections
On 17.03.2024 00:55, Jonas Smedegaard wrote: Thanks for the proposed patch. Unfortunately it does not apply to the Debian package. First: apologies. I seem to have made a mistake during my dist-upgrade and ended up with the old init-script, which makes my provided "patch" logically totally wrong. Please provide a patch against the Debian package (not Devuan). which makes this request unnecessary, because the devuan package is identical to the debian package. Also, nothing else in the Debian packaging messes with the path "$dir/collection-root" - that is left for Radicale itself to handle. Can you please test if adequate to replace the 3 instances of "$dir/collections" with "$dir" instead? So the actual needed patch is quite small and more cosmetic, since it works out of the box, just w/o logging. And your suggested adjustment works, too. Again, apologies for my f***up. I had a minor problem changing the storage dir. All works fine with the defaults storage dir (/var/lib/radicale/collections). When changing it to a different location in the config file, I only got it working, if I do not generate the "storage" part from "filesystem_folder = /path/to/storage" beforehand. Otherwise I get a write permission problem.--- radicale_orig 2024-03-17 18:39:40.696898778 +0100 +++ radicale 2024-03-17 18:41:25.995228178 +0100 @@ -55,9 +55,9 @@ chown $DAEMON_UID:$DAEMON_GID $dir chmod g-w,o-rwx $dir if [ "$CALDIR" = $dir ]; then -[ -e $dir/collections ] || mkdir -p $dir/collections -chown $DAEMON_UID:$DAEMON_GID $dir/collections -chmod g-w,o-rwx $dir/collections +[ -e $dir ] || mkdir -p $dir +chown $DAEMON_UID:$DAEMON_GID $dir +chmod g-w,o-rwx $dir fi fi done @@ -70,7 +70,7 @@ start-stop-daemon --start --quiet --startas $DAEMON \ --exec $DAEMON --test > /dev/null \ || return 1 - start-stop-daemon --start --quiet --startas $DAEMON --background \ + start-stop-daemon --start --quiet --startas $DAEMON --background --output $LOGDIR/$NAME.log \ --exec $DAEMON --umask 0027 --chuid $DAEMON_UID:$DAEMON_GID -- \ $RADICALE_OPTS \ || return 2
Bug#1055771: sysvinit script corrections
Package: radicale Version: 3.1.8-2 [..] Filename: pool/DEBIAN/main/r/radicale/radicale_3.1.8-2_all.deb My System Devuan Daedalus (radicale package the debian bookworm packge) 6.1.0-18-amd64 So applied changes from #1038930 and #1055771 I'm not a 100% sure that I had the unmodified original, so it would be nice if someone could re-check my attached patch--- radicale_orig 2024-03-09 10:46:34.564111521 +0100 +++ radicale 2024-03-12 17:29:29.364390914 +0100 @@ -34,7 +34,7 @@ . /lib/lsb/init-functions # Declare default options -RADICALE_OPTS="--daemon" +RADICALE_OPTS="" # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME @@ -55,9 +55,9 @@ chown $DAEMON_UID:$DAEMON_GID $dir chmod g-w,o-rwx $dir if [ "$CALDIR" = $dir ]; then -[ -e $dir/collections ] || mkdir -p $dir/collections -chown $DAEMON_UID:$DAEMON_GID $dir/collections -chmod g-w,o-rwx $dir/collections +[ -e $dir/collection-root ] || mkdir -p $dir/collection-root +chown $DAEMON_UID:$DAEMON_GID $dir/collection-root +chmod g-w,o-rwx $dir/collection-root fi fi done @@ -68,10 +68,10 @@ fi start-stop-daemon --start --quiet --startas $DAEMON \ - --name $NAME --test > /dev/null \ + --exec $DAEMON --test > /dev/null \ || return 1 - start-stop-daemon --start --quiet --startas $DAEMON \ - --name $NAME --umask 0027 --chuid $DAEMON_UID:$DAEMON_GID -- \ + start-stop-daemon --start --quiet --startas $DAEMON --background --output $LOGDIR/$NAME.log \ + --exec $DAEMON --umask 0027 --chuid $DAEMON_UID:$DAEMON_GID -- \ $RADICALE_OPTS \ || return 2 } @@ -86,7 +86,7 @@ # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --name $NAME + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --user $DAEMON_UID } case "$1" in