From cf3e32a369b03ae438825c23d0ba4f7313b1d13d Mon Sep 17 00:00:00 2001 From: Hans Wurst Date: Mon, 17 Aug 2015 22:27:56 +0200 Subject: [PATCH] committing changes in /etc after emerge run Package changes: +net-misc/badvpn-1.999.130 --- conf.d/badvpn-ncd | 11 ++++++++++ conf.d/badvpn-server | 11 ++++++++++ init.d/badvpn-ncd | 24 ++++++++++++++++++++++ init.d/badvpn-server | 48 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 conf.d/badvpn-ncd create mode 100644 conf.d/badvpn-server create mode 100755 init.d/badvpn-ncd create mode 100755 init.d/badvpn-server diff --git a/conf.d/badvpn-ncd b/conf.d/badvpn-ncd new file mode 100644 index 0000000..ad34c66 --- /dev/null +++ b/conf.d/badvpn-ncd @@ -0,0 +1,11 @@ +# NCD program file. +#ncd_config="/etc/ncd.conf" + +# enable or disable syslog. +#ncd_syslog="NO" + +# Syslog identification. +#ncd_syslog_ident="ncd" + +# Additional arguments. +#ncd_args="" diff --git a/conf.d/badvpn-server b/conf.d/badvpn-server new file mode 100644 index 0000000..ed5103d --- /dev/null +++ b/conf.d/badvpn-server @@ -0,0 +1,11 @@ +# User account to run server as. +#vpn_user="badvpn" + +# Enable or disable syslog. +#vpn_syslog="NO" + +# Syslog identification. +#vpn_syslog_ident="badvpn-server" + +# Arguments to badvpn-server. +vpn_args="--listen-addr 0.0.0.0:7179" diff --git a/init.d/badvpn-ncd b/init.d/badvpn-ncd new file mode 100755 index 0000000..509a17f --- /dev/null +++ b/init.d/badvpn-ncd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Released under the 3-clause BSD license. + +command="${ncd_exec:-"/usr/bin/badvpn-ncd"}" +command_args="${ncd_args} --config-file ${ncd_config:-/etc/ncd.conf}" +command_background="YES" +description="Network Configuration Daemon" +pidfile="/var/run/${RC_SVCNAME}.pid" + +depend() { + need localmount + after bootmisc + before netmount +} + +start_pre() { + if yesno "${ncd_syslog:-NO}"; then + command_args="${command_args} + --logger syslog + --syslog-ident \"${ncd_syslog_ident:-${RC_SVCNAME}}\" + --channel-loglevel ncd_log_msg info" + fi +} diff --git a/init.d/badvpn-server b/init.d/badvpn-server new file mode 100755 index 0000000..94e3518 --- /dev/null +++ b/init.d/badvpn-server @@ -0,0 +1,48 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Released under the 3-clause BSD license. + +command="${vpn_exec:-/usr/bin/badvpn-server}" +command_args="${vpn_args}" +command_background="YES" +description="BadVPN server" +pidfile="/var/run/${RC_SVCNAME}.pid" +start_stop_daemon_args="--user \"${vpn_user:-badvpn}\"" + +depend() { + need localmount + after bootmisc + if yesno "${vpn_syslog:-NO}"; then + use logger + fi +} + +start_pre() { + if yesno "${vpn_syslog:-NO}"; then + command_args="${command_args} + --logger syslog + --syslog-ident \"${vpn_syslog_ident:-${RC_SVCNAME}}\"" + fi +} + +start() +{ + [ -n "$command" ] || return 0 + local _background= + ebegin "Starting ${name:-$RC_SVCNAME}" + if yesno "${command_background}"; then + if [ -z "${pidfile}" ]; then + eend 1 "command_background option used but no pidfile specified" + return 1 + fi + _background="--background --make-pidfile" + fi + eval start-stop-daemon --start \ + --exec $command \ + ${procname:+--name} $procname \ + ${pidfile:+--pidfile} $pidfile \ + $_background $start_stop_daemon_args \ + -- $command_args + eend $? "Failed to start $RC_SVCNAME" + return $? +}