security/softether: Add rc script for TrafficServer
This commit is contained in:
parent
f934027911
commit
8b4b483d86
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=540774
6 changed files with 150 additions and 10 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
PORTNAME= softether
|
||||
DISTVERSION= 4.34-9745-beta
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= security net-vpn
|
||||
MASTER_SITES= https://www.softether-download.com/files/softether/v${DISTVERSION}-2020.04.05-tree/Source_Code/
|
||||
PKGNAMESUFFIX= -devel
|
||||
|
@ -20,7 +20,8 @@ IGNORE= no beta version available right now, use security/softether instead
|
|||
|
||||
USES= dos2unix gmake iconv:wchar_t localbase:ldflags ncurses \
|
||||
readline ssl
|
||||
USE_RC_SUBR= softether_bridge softether_client softether_server
|
||||
USE_RC_SUBR= softether_bridge softether_client \
|
||||
softether_server softether_trafficserver
|
||||
|
||||
DOS2UNIX_FILES= ChangeLog LICENSE README *.TXT \
|
||||
src/Cedar/*.* src/Mayaqua/*.*
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
To run softether vpn client from startup, run
|
||||
To run SoftEtherVPN client from startup, run
|
||||
sysrc softether_client_enable=yes
|
||||
|
||||
To run softether vpn server from startup, run
|
||||
To run SoftEtherVPN server from startup, run
|
||||
sysrc softether_server_enable=yes
|
||||
|
||||
To run softether vpn bridge from startup, run
|
||||
To run SoftEtherVPN bridge from startup, run
|
||||
sysrc softether_bridge_enable=yes
|
||||
|
||||
To run SoftEtherVPN traffic server from startup, run
|
||||
sysrc softether_trafficserver_enable=yes
|
||||
|
||||
Initial and further configuration of all softether services can be
|
||||
done either by using a Windows client to connect to the running
|
||||
services or by vpncmd from command line.
|
||||
|
|
66
security/softether-devel/files/softether_trafficserver.in
Normal file
66
security/softether-devel/files/softether_trafficserver.in
Normal file
|
@ -0,0 +1,66 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: softether_trafficserver
|
||||
# REQUIRE: NETWORKING SERVERS
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable softether_trafficserver:
|
||||
#
|
||||
# softether_trafficserver_enable (bool):
|
||||
# Set it to "YES" to enable.
|
||||
# (default: NO)
|
||||
# softether_trafficserver_user (username):
|
||||
# Username used to run the daemon.
|
||||
# (default: nobody)
|
||||
# softether_trafficserver_pid (str):
|
||||
# Path of the pid file.
|
||||
# (default: %%SE_PIDDIR%%/trafficserver.pid)
|
||||
# softether_trafficserver_log (str):
|
||||
# Path of the log file.
|
||||
# (default: %%SE_LOGDIR%%/trafficserver/trafficserver.log)
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=softether_trafficserver
|
||||
rcvar=softether_trafficserver_enable
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${softether_trafficserver_enable:=NO}
|
||||
: ${softether_trafficserver_pid:="%%SE_PIDDIR%%/trafficserver.pid"}
|
||||
: ${softether_trafficserver_log:="%%SE_LOGDIR%%/trafficserver/trafficserver.log"}
|
||||
: ${softether_trafficserver_user:=nobody}
|
||||
|
||||
command="%%PREFIX%%/libexec/softether/vpncmd"
|
||||
command_args="/TOOLS /CMD:TrafficServer /NOHUP:yes"
|
||||
|
||||
logdir="%%SE_LOGDIR%%"
|
||||
|
||||
start_precmd="${name}_precmd"
|
||||
start_cmd="${name}_start"
|
||||
|
||||
pidfile="${softether_trafficserver_pid}"
|
||||
ts_user="${softether_trafficserver_user}"
|
||||
logfile="${softether_trafficserver_log}"
|
||||
|
||||
softether_trafficserver_precmd()
|
||||
{
|
||||
if [ ! -d "${logdir}/trafficserver" ]; then
|
||||
umask 077
|
||||
mkdir -p ${logdir}/trafficserver
|
||||
fi
|
||||
}
|
||||
|
||||
softether_trafficserver_start()
|
||||
{
|
||||
/usr/sbin/daemon \
|
||||
-c \
|
||||
-t trafficserver \
|
||||
-o "${logfile}" \
|
||||
-p "${pidfile}" \
|
||||
-u "${ts_user}" \
|
||||
${command} ${command_args}
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
PORTNAME= softether
|
||||
DISTVERSION= 4.34-9745
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= security net-vpn
|
||||
MASTER_SITES= https://www.softether-download.com/files/softether/v${DISTVERSION}-rtm-2020.04.05-tree/Source_Code/
|
||||
DISTNAME= ${PORTNAME}-src-v${DISTVERSION}-rtm
|
||||
|
@ -18,7 +18,8 @@ ONLY_FOR_ARCHS_REASON= Upstream only supports amd64 and i386: https://www.softet
|
|||
|
||||
USES= dos2unix gmake iconv:wchar_t localbase:ldflags ncurses \
|
||||
readline ssl
|
||||
USE_RC_SUBR= softether_bridge softether_client softether_server
|
||||
USE_RC_SUBR= softether_bridge softether_client \
|
||||
softether_server softether_trafficserver
|
||||
|
||||
DOS2UNIX_FILES= ChangeLog LICENSE README *.TXT \
|
||||
src/Cedar/*.* src/Mayaqua/*.*
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
To run softether vpn client from startup, run
|
||||
To run SoftEtherVPN client from startup, run
|
||||
sysrc softether_client_enable=yes
|
||||
|
||||
To run softether vpn server from startup, run
|
||||
To run SoftEtherVPN server from startup, run
|
||||
sysrc softether_server_enable=yes
|
||||
|
||||
To run softether vpn bridge from startup, run
|
||||
To run SoftEtherVPN bridge from startup, run
|
||||
sysrc softether_bridge_enable=yes
|
||||
|
||||
To run SoftEtherVPN traffic server from startup, run
|
||||
sysrc softether_trafficserver_enable=yes
|
||||
|
||||
Initial and further configuration of all softether services can be
|
||||
done either by using a Windows client to connect to the running
|
||||
services or by vpncmd from command line.
|
||||
|
|
66
security/softether/files/softether_trafficserver.in
Normal file
66
security/softether/files/softether_trafficserver.in
Normal file
|
@ -0,0 +1,66 @@
|
|||
#!/bin/sh
|
||||
|
||||
# PROVIDE: softether_trafficserver
|
||||
# REQUIRE: NETWORKING SERVERS
|
||||
# BEFORE: DAEMON
|
||||
# KEYWORD: shutdown
|
||||
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable softether_trafficserver:
|
||||
#
|
||||
# softether_trafficserver_enable (bool):
|
||||
# Set it to "YES" to enable.
|
||||
# (default: NO)
|
||||
# softether_trafficserver_user (username):
|
||||
# Username used to run the daemon.
|
||||
# (default: nobody)
|
||||
# softether_trafficserver_pid (str):
|
||||
# Path of the pid file.
|
||||
# (default: %%SE_PIDDIR%%/trafficserver.pid)
|
||||
# softether_trafficserver_log (str):
|
||||
# Path of the log file.
|
||||
# (default: %%SE_LOGDIR%%/trafficserver/trafficserver.log)
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=softether_trafficserver
|
||||
rcvar=softether_trafficserver_enable
|
||||
load_rc_config ${name}
|
||||
|
||||
: ${softether_trafficserver_enable:=NO}
|
||||
: ${softether_trafficserver_pid:="%%SE_PIDDIR%%/trafficserver.pid"}
|
||||
: ${softether_trafficserver_log:="%%SE_LOGDIR%%/trafficserver/trafficserver.log"}
|
||||
: ${softether_trafficserver_user:=nobody}
|
||||
|
||||
command="%%PREFIX%%/libexec/softether/vpncmd"
|
||||
command_args="/TOOLS /CMD:TrafficServer /NOHUP:yes"
|
||||
|
||||
logdir="%%SE_LOGDIR%%"
|
||||
|
||||
start_precmd="${name}_precmd"
|
||||
start_cmd="${name}_start"
|
||||
|
||||
pidfile="${softether_trafficserver_pid}"
|
||||
ts_user="${softether_trafficserver_user}"
|
||||
logfile="${softether_trafficserver_log}"
|
||||
|
||||
softether_trafficserver_precmd()
|
||||
{
|
||||
if [ ! -d "${logdir}/trafficserver" ]; then
|
||||
umask 077
|
||||
mkdir -p ${logdir}/trafficserver
|
||||
fi
|
||||
}
|
||||
|
||||
softether_trafficserver_start()
|
||||
{
|
||||
/usr/sbin/daemon \
|
||||
-c \
|
||||
-t trafficserver \
|
||||
-o "${logfile}" \
|
||||
-p "${pidfile}" \
|
||||
-u "${ts_user}" \
|
||||
${command} ${command_args}
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
Loading…
Reference in a new issue