>>27
#!/bin/bash

APIKEY='自分で調べてね'
HMKEY='自分で調べてね'
UA='Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko'
APIAUTHUA='Mozilla/3.0 (compatible; JaneStyle/3.83)'
APIDATUA='Mozilla/3.0 (compatible; JaneStyle/3.83)'
APIAUTHXUA='JaneStyle/3.83'
APIDATXUA="JaneStyle/3.83"
PORT=8888
TIMEOUT=9
PROXY=''
OPENPROXY=''
eval CHPROXYPATH="~/2ch/proxy2ch"
eval JDPATH="~/jd-2.8.9-150226/jd"
[ -e "${CHPROXYPATH}" ] || exit ; [ -x "${CHPROXYPATH}" ] || exit ; [ -e "${JDPATH}" ] || exit ; [ -x "${JDPATH}" ] || exit
if [ "${APIKEY}" -a "${HMKEY}" ]; then
"${CHPROXYPATH}" ${PORT:+ -p "${PORT}"} ${TIMEOUT:+ -t "${TIMEOUT}"} ${UA:+ -a "${UA}"} ${OPENPROXY:+ -g} ${PROXY:+ --proxy "${PROXY}"} \
--api ${APIKEY}:${HMKEY} \
${APIAUTHUA:+ --api-auth-ua "${APIAUTHUA}"} \
${APIDATUA:+ --api-dat-ua "${APIDATUA}"} \
${APIAUTHXUA:+ --api-auth-xua "${APIAUTHXUA}"} \
${APIDATXUA:+ --api-dat-xua "${APIDATXUA}"} &
else
"${CHPROXYPATH}" ${PORT:+ -p "${PORT}"} ${TIMEOUT:+ -t "${TIMEOUT}"} ${UA:+ -a "${UA}"} ${OPENPROXY:+ -g} ${PROXY:+ --proxy "${PROXY}"} &
fi
echo "proxy2ch PID= $!";sleep 1;"${JDPATH}";echo "JD $?";sleep 1;
kill $!
echo "kill $?";sleep 1
exit