📖 Lili's blog, 2024 edition

🚨🚨🚨 we are so fucking back 🚨🚨🚨

Back to main page


Hello everyone, down below are all the posts for 2024. To see all my posts regardless of years, click here.

Disable logging in Nagios nsclient++ 0.3.923 on Windows

[linkstandalone]

Hi everyone

I'm noting this down here because I haven't found much documentation about this on the web and discovered it while testing stuff.

If you want to completely disable logging, there should be a configuration file under C:\Program Files\NSClient++\NSC.ini ou C:\Program Files\NSClient++\nsclient.ini. Edit that file and comment the line FileLogger.dll. This line is in the [Modules] section.

Restart the nsclient++ service via services.msc and look at the size of nsclient.log: it won't increase or be created anymore.

NOTE:This configuration option should work with version prior to 0.4.0. More recent versions have the log file = none option in the configuration file to stop logging. ven., 12 avril 2024 01:04:20 +0200

Alias to show git aliases

[linkstandalone]

Hello cyberspace,

Just putting this here so I remember it. Handy alias to show aliases you've made with git (via git config alias.: execute git config --global alias.aliases '!git --no-pager config --get-regexp "alias.*"' and then you can just type git aliases to show them. mer., 31 janv. 2024 22:01:03 +0100

rc script to daemonize prosody-filer on FreeBSD

[linkstandalone]

Happy new year and best wishes to you, reader!

I was searching for a rc script to daemonizeprosody-filer on FreeBSD but didn't find anything, so I decided to make my own. Here's the script below, it worked for me with a non-root user with disabled password and it's shell set to /usr/sbin/nologin:

#!/bin/sh

# PROVIDE: prosody_filer
# REQUIRE: FILESYSTEMS networking
# KEYWORDS: http upload

. /etc/rc.subr

name="prosody_filer"
program_name="prosody-filer"
title="Prosody-Filer"
rcvar=prosody_filer_enable
prosody_filer_user="prosodyfiler"  # créez l'utilisateur et le groupe
prosody_filer_group="prosodyfiler" # au préalable !
prosody_filer_chdir="/home/prosodyfiler/"

pidfile="/home/prosodyfiler/${program_name}.pid"
required_files="/home/prosodyfiler/config.toml"
exec_path="/home/prosodyfiler/${program_name}"
output_file="/var/log/${program_name}.log"

command="/usr/sbin/daemon"
command_args="-r -t ${title} -o ${output_file} -P ${pidfile} -f ${exec_path}"

load_rc_config $name
: ${prosody_filer_enable="NO"}

run_rc_command "$1"

You can then execute sysrc prosody_filer_enable=YES to enable the service and start it with service prosody_filer start. dim., 21 janv. 2024 21:49:52 +0100