May 1, 2025 update
This commit is contained in:
@ -1,18 +1,16 @@
|
||||
FreeBSD: {
|
||||
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
|
||||
enabled: no
|
||||
enabled: yes
|
||||
}
|
||||
|
||||
pkgp-freebsd-pkg: {
|
||||
url: "http://pkgp-freebsd-pkg.ahlawat.com/${ABI}/latest",
|
||||
mirror_type: "http",
|
||||
enabled: yes,
|
||||
enabled: no,
|
||||
priority: 10
|
||||
}
|
||||
|
||||
pkgp123: {
|
||||
url: "http://pkgp.ahlawat.com/packages/pj123-default/",
|
||||
mirror_type: "http",
|
||||
signature_type: "pubkey",
|
||||
pubkey: "/mnt/data/apps/certs/poudriere.cert",
|
||||
enabled: no,
|
||||
|
@ -1,44 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2018-2022, diyIT.org
|
||||
# All rights reserved.
|
||||
#
|
||||
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
|
||||
# https://diyit.org/license/
|
||||
#
|
||||
#
|
||||
|
||||
# the two lines below are not just comments but required by rcorder; service -e
|
||||
# PROVIDE: gstat_exporter
|
||||
# REQUIRE: NETWORKING DAEMON
|
||||
# REQUIRE: LOGIN NETWORKING
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following lines to /etc/rc.conf to enable gstat_exporter:
|
||||
#
|
||||
# gstat_exporter_enable (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to enable gstat_exporter_enable.
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
: ${gstat_exporter_enable="NO"}
|
||||
|
||||
name=gstat_exporter
|
||||
rcvar=${name}_enable
|
||||
|
||||
GSTATEXPORTER="nohup /usr/local/bin/python3.9 /root/FreeBSD/scripts/gstat_exporter.py"
|
||||
|
||||
start_cmd="${name}_start"
|
||||
stop_cmd="${name}_stop"
|
||||
restart_cmd="${name}_restart"
|
||||
|
||||
gstat_exporter_start()
|
||||
{
|
||||
$GSTATEXPORTER &
|
||||
}
|
||||
|
||||
gstat_exporter_stop()
|
||||
{
|
||||
ps ax | grep -ie gstat_exporter.py | grep -v grep | awk '{print $1}' | xargs kill -9
|
||||
}
|
||||
gstat_exporter_restart()
|
||||
{
|
||||
gstat_exporter_stop
|
||||
gstat_exporter_start
|
||||
}
|
||||
rcvar=gstat_exporter_enable
|
||||
desc="gstat_exporter daemon"
|
||||
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${gstat_exporter_enable:=NO}
|
||||
|
||||
pidfile="/var/run/${name}.pid"
|
||||
command_interpreter=/usr/local/bin/python3.11
|
||||
command=/usr/local/bin/${name}.py
|
||||
start_cmd="/usr/sbin/daemon -f -p ${pidfile} $command_interpreter $command"
|
||||
|
||||
run_rc_command "$1"
|
||||
|
Reference in New Issue
Block a user