| 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/security/go-cve-dictionary/files/ |
Upload File : |
#!/bin/sh
# PROVIDE: %%PORTNAME%%
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# go_cve_dictionary_enable (bool): Set to NO by default
# Set it to YES to enable the CVE server
# go_cve_dictionary_user (string): Set user to run go_cve_dictionary
# Default is "%%USERS%%"
# go_cve_dictionary_group (string): Set group to run go_cve_dictionary
# Default is "%%GROUPS%%"
# go_cve_dictionary_db_path (string): Set database path
# Default is "/var/db/vuls/cve.sqlite3"
# go_cve_dictionary_db_type (string): Set database type
# Default is "sqlite3"
# go_cve_dictionary_log_file (string): Set file that go_cve_dictionary will log to
# Default is "/var/log/vuls/go_cve_dictionary.log"
# go_cve_dictionary_args (string): Set additional command line arguments
# Default is ""
. /etc/rc.subr
name=go_cve_dictionary
rcvar=go_cve_dictionary_enable
load_rc_config $name
: ${go_cve_dictionary_enable:="NO"}
: ${go_cve_dictionary_user:="%%USERS%%"}
: ${go_cve_dictionary_group:="%%GROUPS%%"}
: ${go_cve_dictionary_db_path:="/var/db/vuls/cve.sqlite3"}
: ${go_cve_dictionary_db_type:="sqlite3"}
: ${go_cve_dictionary_log_file:="/var/log/vuls/go_cve_dictionary.log"}
: ${go_cve_dictionary_args:=""}
pidfile=/var/run/go_cve_dictionary.pid
command="/usr/sbin/daemon"
procname="%%PREFIX%%/bin/%%PORTNAME%%"
command_args="-p ${pidfile} /usr/bin/env ${procname} server \
-dbpath=${go_cve_dictionary_db_path} \
-dbtype=${go_cve_dictionary_db_type} \
${go_cve_dictionary_args} >> ${go_cve_dictionary_log_file} 2>&1"
start_precmd=go_cve_dictionary_startprecmd
go_cve_dictionary_startprecmd()
{
if [ ! -e ${pidfile} ]; then
install -o ${go_cve_dictionary_user} -g ${go_cve_dictionary_group} \
-m 640 /dev/null ${pidfile};
fi
if [ ! -f "${go_cve_dictionary_log_file}" ]; then
install -o ${go_cve_dictionary_user} -g ${go_cve_dictionary_group} \
-m 640 /dev/null ${go_cve_dictionary_log_file};
fi
}
load_rc_config $name
run_rc_command "$1"