| Server IP : 82.208.35.60 / Your IP : 216.73.216.89 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/ipad_charge/files/ |
Upload File : |
#!/bin/sh
# PROVIDE: ipad_charge
# REQUIRE: DAEMON
#
# Add the following line to /etc/rc.conf[.local] to enable ipad_charge:
#
# ipad_charge_enable="YES"
# ipad_charge_action="ON" (default)
# ipad_charge_action="OFF"
#
ipad_charge_enable=${ipad_charge_enable-"NO"}
ipad_charge_action=${ipad_charge_action-"ON"}
. /etc/rc.subr
name=ipad_charge
rcvar=ipad_charge_enable
command="/usr/sbin/usbconfig"
command_args_on="-d $2 do_request 0x40 0x40 0x6400 0x6400 0"
command_args_off="-d $2 do_request 0x40 0x40 0x6400 0x0000 0"
start_precmd="${name}_prestart"
pidfile=""
ipad_charge_prestart()
{
case ${ipad_charge_action} in
[Oo][Nn])
command_args="${command_args_on}"
;;
*)
command_args="${command_args_off}"
;;
esac
}
load_rc_config $name
if [ $# -gt 1 ]; then
# Only run the rc command if the appropriate arguments are specified:
run_rc_command $1
fi