diff options
Diffstat (limited to 'net-mgmt/netdisco/files')
-rw-r--r-- | net-mgmt/netdisco/files/localenv.in | 14 | ||||
-rw-r--r-- | net-mgmt/netdisco/files/netdisco.in | 117 | ||||
-rw-r--r-- | net-mgmt/netdisco/files/netdiscologs.conf.sample.in | 2 | ||||
-rw-r--r-- | net-mgmt/netdisco/files/pkg-message.in | 23 |
4 files changed, 0 insertions, 156 deletions
diff --git a/net-mgmt/netdisco/files/localenv.in b/net-mgmt/netdisco/files/localenv.in deleted file mode 100644 index e1bc04752b1b..000000000000 --- a/net-mgmt/netdisco/files/localenv.in +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/local/bin/perl - -use strict; -use warnings; - -use lib '%%ETCDIR%%/perl5/lib/perl5'; -use local::lib '%%ETCDIR%%/perl5'; - -unless ( caller ) { - if ( @ARGV ) { - exec @ARGV; - } -} - diff --git a/net-mgmt/netdisco/files/netdisco.in b/net-mgmt/netdisco/files/netdisco.in deleted file mode 100644 index c920311c82e9..000000000000 --- a/net-mgmt/netdisco/files/netdisco.in +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/sh - -# PROVIDE: netdisco -# REQUIRE: DAEMON LOGIN -# AFTER: postgresql -# KEYWORD: shutdown - -. /etc/rc.subr - -name="netdisco" -rcvar="netdisco_enable" -start_precmd="netdisco_start_precmd" -start_cmd="netdisco_cmd" -stop_cmd="netdisco_cmd" -status_cmd="netdisco_cmd" -reload_cmd="netdisco_reload_cmd" -rcvar_cmd="netdisco_rcvar_cmd" -extra_commands="reload status" - -: ${netdisco_home="/var/run/netdisco"} -: ${netdisco_user="netdisco"} -: ${netdisco_group="netdisco"} -netdisco_daemons="web backend" - -netdisco_start_precmd() { - # /var/run and /var/log - if [ ! -d /var/run/netdisco ]; then - mkdir /var/run/netdisco - chown -R netdisco:netdisco /var/run/netdisco - fi - if [ ! -d /var/log/netdisco ]; then - mkdir /var/log/netdisco - chown netdisco:netdisco /var/log/netdisco - fi - if [ ! -d /usr/local/etc/netdisco/logs ]; then - ln -s /var/log/netdisco /usr/local/etc/netdisco/logs - fi - # populate /var/run/netdisco - for dir in environments perl5 netdisco-mibs; do - test -d /var/run/netdisco/$dir || ln -fs /usr/local/etc/netdisco/$dir /var/run/netdisco/$dir - done - test -d /var/run/netdisco/logs || ln -s /var/log/netdisco /var/run/netdisco/logs -} - -netdisco_cmd() { - local name rcvar rcvars v command pidfile netdisco_daemons result force_run interpreter - # Prevent recursive calling - unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd" - # Ignore rcvar and run command - if [ -n "${_rc_prefix}" -a "${_rc_prefix}" = "one" ] || [ -n "${rc_force}" ] || [ -n "${rc_fast}" ]; then - force_run=yes - fi - # Assume success - result=0 - # Apply to all daemons - for n in ${netdisco_daemons}; do - name="netdisco_$n" - rcvars=''; v='' - name=${name} - rcvar=${name}_enable - command="/usr/local/bin/netdisco-${n}" - command_args=${rc_arg} - pidfile="/var/run/netdisco/netdisco-${n}.pid" - [ "$n" = "web" ] && command_interpreter="perl" || command_interpreter="" - # Daemon should be enabled and running - if ( [ -n "${rcvar}" ] && checkyesno "${rcvar}" ) || [ -n "$force_run" ]; then - run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args} - # If any of the commands failed, take it as a global result - result=$((${result} || $?)) - fi - done - return ${result} -} - -netdisco_rcvar_cmd() { - local name rcvar - rcvar=${name}_enable - # Prevent recursive calling - unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd" - # Check master variable - run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args} - # Check dependent variables - for n in ${netdisco_daemons}; do - name=netdisco_${n} - # XXX - rcvars=''; v='' - rcvar=${name}_enable - run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args} - done -} - -netdisco_config_init() { - local name - load_rc_config "${name}" - for n in ${netdisco_daemons}; do - load_rc_config "netdisco_${n}" - done - # Defaults - netdisco_enable=${netdisco_enable:=NO} - if [ -n "${rcvar}" ] && checkyesno "${rcvar}"; then - netdisco_web_enable=${netdisco_enable} - netdisco_backend_enable=${netdisco_enable} - fi - netdisco_web_enable=${netdisco_web_enable:-NO} - netdisco_web_pidfile=${netdisco_web_pidfile:-"/var/run/netdisco/netdisco-web.pid"} - netdisco_backend_enable=${netdisco_backend_enable:-NO} - netdisco_web_user=${netdisco_user} - netdisco_backend_user=${netdisco_user} - netdisco_web_group=${netdisco_group} - netdisco_backend_group=${netdisco_group} - export NETDISCO_HOME=/var/run/netdisco -} - -# load config -netdisco_config_init - -run_rc_command "$1" diff --git a/net-mgmt/netdisco/files/netdiscologs.conf.sample.in b/net-mgmt/netdisco/files/netdiscologs.conf.sample.in deleted file mode 100644 index b2727ba1efee..000000000000 --- a/net-mgmt/netdisco/files/netdiscologs.conf.sample.in +++ /dev/null @@ -1,2 +0,0 @@ -/var/log/netdisco/netdisco-web.log %%NETDISCO_USER%%:%%NETDISCO_GROUP%% 640 7 1000 * JC /var/run/netdisco/netdisco-web.pid -/var/log/netdisco/netdisco-daemon.log %%NETDISCO_USER%%:%%NETDISCO_GROUP%% 640 7 1000 * JC /var/run/netdisco/netdisco-daemon.pid diff --git a/net-mgmt/netdisco/files/pkg-message.in b/net-mgmt/netdisco/files/pkg-message.in deleted file mode 100644 index ca61ebd25666..000000000000 --- a/net-mgmt/netdisco/files/pkg-message.in +++ /dev/null @@ -1,23 +0,0 @@ -[ -{ type: install - message: <<EOM -to get Netdisco running, you just have to: - * edit %%ETCDIR%%/environments/deployment.yml to suit your needs - (https://github.com/netdisco/netdisco/wiki/Configuration) - * edit rc.conf according to %%PREFIX%%/etc/rc.d/netdisco - * have a look at https://metacpan.org/pod/App::Netdisco - note that ~/environments is replaced here by %%ETCDIR%%/environments - * launch netdisco-deploy *as user netdisco* to install/upgrade your database - su - netdisco -c "netdisco-deploy" - * copy (or link) %%ETCDIR%%/netdiscologs.conf - to %%PREFIX%%/etc/newsyslog.conf.d/ to take care - of logs rotation - ln -s %%ETCDIR%%/netdiscologs.conf %%PREFIX%%/etc/newsyslog.conf.d/netdiscologs.conf - -Always use "su - netdisco" or "sudo -l -u netdisco" before running netdisco-do or - any netdisco-* command (because of locallib use) -If running with another user or missing HOME variable (eg: sudo without -l) you - need NETDISCO_HOME=%%ETCDIR%% environment variable -EOM -} -] |