From: "Anthony G. Basile" <blueness@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/blueness:master commit in: net-proxy/obfsproxy/files/
Date: Sat, 19 Jan 2013 13:51:25 +0000 (UTC) [thread overview]
Message-ID: <1358603471.e90ed138ecef0d255d46673cecbfb773cd23196c.blueness@gentoo> (raw)
commit: e90ed138ecef0d255d46673cecbfb773cd23196c
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 19 13:51:11 2013 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Jan 19 13:51:11 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/blueness.git;a=commit;h=e90ed138
net-proxy/obfsproxy: fix CMDLINE for initd
---
net-proxy/obfsproxy/files/obfsproxy.confd | 2 +-
net-proxy/obfsproxy/files/obfsproxy.initd | 20 +++++++++++---------
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/net-proxy/obfsproxy/files/obfsproxy.confd b/net-proxy/obfsproxy/files/obfsproxy.confd
index 30e8fa9..0f3699d 100644
--- a/net-proxy/obfsproxy/files/obfsproxy.confd
+++ b/net-proxy/obfsproxy/files/obfsproxy.confd
@@ -31,7 +31,7 @@ PROTOCOL="obfs2"
# Example:
# obfsproxy obfs2 --dest=127.0.0.1:666 --shared-secret=himitsu server 127.0.0.1:1026
-MODE="socks"
+MODE="server"
DESTINATION="127.0.0.1:666"
SECRET="changeme"
LISTEN="127.0.0.1:1026"
diff --git a/net-proxy/obfsproxy/files/obfsproxy.initd b/net-proxy/obfsproxy/files/obfsproxy.initd
index 2e67745..887a7c8 100644
--- a/net-proxy/obfsproxy/files/obfsproxy.initd
+++ b/net-proxy/obfsproxy/files/obfsproxy.initd
@@ -13,23 +13,25 @@ depend() {
start() {
[ "x${MODE}" = "x" ] && eerror "MODE not given"
if [ ${PROTOCOL} = "dummy" ] ; then
- [ "x${MODE}" = "xserver" && "x${TARGET}" = "x" ] && eerror "MODE=server but no target was given"
- [ "x${MODE}" = "xsocks" && "x${TARGET}" != "x" ] && eerror "MODE=sock but a target was given"
- CMDLINE="${MODE} ${LISTEN} ${TARGET} ${LOGGING}"
+ [[ "x${MODE}" = "xserver" && "x${TARGET}" = "x" ]] && eerror "MODE=server but no target was given"
+ [[ "x${MODE}" = "xsocks" && "x${TARGET}" != "x" ]] && eerror "MODE=sock but a target was given"
+ CMDLINE="${LOGGING} ${PROTOCOL} ${MODE} ${LISTEN} ${TARGET}"
elif [ ${PROTOCOL} = "obfs2" ] ; then
- [ "x${LISTEN}" = "x" ] && eerror "LISTEN host:port is not given"
- [ "x${DESTINATION}" != "x" ] && DESTINATION="--dest=${DESTINATION}"
- [ "x${SECRET}" != "x" ] && SECRET="--shared-secret=${SECRET}"
- CMDLINE="${DESTINATION} ${SECRET} ${MODE} ${LISTEN} ${LOGGING}"
+ [[ "x${MODE}" = "xsocks" && "x${DESTINATION}" != "x" ]] && eerror "MODE=sock but a destination was given"
+ [[ "x${LISTEN}" = "x" ]] && eerror "LISTEN host:port is not given"
+ [[ "x${DESTINATION}" != "x" ]] && DESTINATION="--dest=${DESTINATION}"
+ [[ "x${SECRET}" != "x" ]] && SECRET="--shared-secret=${SECRET}"
+ CMDLINE="${LOGGING} ${PROTOCOL} ${DESTINATION} ${SECRET} ${MODE} ${LISTEN}"
else
eerror "Unknown protocol ${PROTOCOL}"
fi
- start-stop-daemon --start --pidfile "${PIDFILE}" --exec "${DAEMON}"
+ ewarn ${CMDLINE}
+ start-stop-daemon -b --start --exec ${DAEMON} -- ${CMDLINE}
eend $?
}
stop() {
- start-stop-daemon --stop --pidfile "${PIDFILE}"
+ start-stop-daemon --stop --exec ${DAEMON}
}
next reply other threads:[~2013-01-19 13:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-19 13:51 Anthony G. Basile [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-01-19 15:38 [gentoo-commits] dev/blueness:master commit in: net-proxy/obfsproxy/files/ Anthony G. Basile
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1358603471.e90ed138ecef0d255d46673cecbfb773cd23196c.blueness@gentoo \
--to=blueness@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox