Hi !
I cannot stop this service with
service librenms stop
and also i cannot stop the jail with this service
I have copied this file to /usr/local/etc/rc.d/librenms and i have enabled the service in rc.conf
What is wrong ?
Thanks
[/CODE]
I cannot stop this service with
service librenms stop
and also i cannot stop the jail with this service
I have copied this file to /usr/local/etc/rc.d/librenms and i have enabled the service in rc.conf
What is wrong ?
Thanks
Bash:
[CODE=bash]#!/bin/sh
# PROVIDE: librenms
# REQUIRE: SERVERS mysql
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# librenms_enable: Set to NO by default.
# Set it to YES to enable librenms
# librenms_user: The user account used to run the daemon.
# Default: www
# librenms_group: The group account used to run the daemon.
# Default: www
# librenms_pid: Path of the pid file.
# Default /var/run/librenms/librenms.pid
# librenms_daemonflags: Flags passed to daemon(8), overwrite this to use eg syslog
# Default "-o /var/log/librenms/librenms-service.log"
#
# Contributed by: Dries Michiels (driesm@FreeBSD.org)
. /etc/rc.subr
name=librenms
rcvar="${name}_enable"
load_rc_config $name
: ${librenms_enable:="NO"}
: ${librenms_user:="www"}
: ${librenms_group:="www"}
: ${librenms_pid:="/var/run/librenms/librenms.pid"}
: ${librenms_daemonflags:="-o /var/log/$name-service.log"}
pidfile="$librenms_pid"
procname="/usr/local/bin/python3.8"
command="/usr/sbin/daemon"
start_precmd=librenms_precmd
librenms_precmd()
{
[ -f /var/log/$name-service.log ] || install -g $librenms_group -o $librenms_user -m 644 /dev/null /var/log/$name-service.log
[ -f /var/log/$name.log ] || install -g $librenms_group -o $librenms_user -m 644 /dev/null /var/log/$name.log
}
command_args="$librenms_daemonflags -p $pidfile $procname /usr/opt/librenms/librenms-service.py"
run_rc_command "$1"