diff options
author | Oleg A. Deordiev <admin@ifconfig.com.ua> | 2014-04-18 09:29:18 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-04-23 07:51:42 +0700 |
commit | c26b971d080371f47752bd706c9cfc317b34affd (patch) | |
tree | c0ce708a86ecaae867435fe99857ade505a830b3 /network/rejik/fixdestdir.patch | |
parent | 6234dabd2741a19fb07e72f04c32e4c9e884e1a8 (diff) | |
download | slackbuilds-c26b971d080371f47752bd706c9cfc317b34affd.tar.gz |
network/rejik: Added (squid redirector).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/rejik/fixdestdir.patch')
-rw-r--r-- | network/rejik/fixdestdir.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/network/rejik/fixdestdir.patch b/network/rejik/fixdestdir.patch new file mode 100644 index 0000000000..c0c5478a65 --- /dev/null +++ b/network/rejik/fixdestdir.patch @@ -0,0 +1,74 @@ +--- Makefile- 2014-04-17 19:12:52.415410443 +0300 ++++ Makefile 2014-04-17 19:13:19.979613470 +0300 +@@ -1,7 +1,8 @@ + ### Edit this: +-INSTALL_PATH=/usr/local/rejik3 +-SQUID_USER=squid +-SQUID_GROUP=squid ++INSTALL_PATH=/var/lib/rejik ++DSTDIR_PATH=${DSTDIR}${INSTALL_PATH} ++SQUID_USER=nobody ++SQUID_GROUP=nogroup + + CC=gcc -Wall + INCLUDE=-I/usr/include -I/usr/local/include -I/usr/include/pcre +@@ -40,36 +41,38 @@ + + install: + # Make dirs +- mkdir -p ${INSTALL_PATH}/tools ++ mkdir -p ${DSTDIR_PATH}/tools ++ mkdir -p ${DSTDIR}/etc/squid ++ mkdir -p ${DSTDIR}/var/log/squid/rejik + + # Install redirector +- cp make-cache ${INSTALL_PATH} +- cp redirector ${INSTALL_PATH} +- cp redirector.conf.dist ${INSTALL_PATH} ++ cp make-cache ${DSTDIR_PATH} ++ cp redirector ${DSTDIR_PATH} ++ cp redirector.conf.dist ${DSTDIR}/etc/squid + + # Install tools +- echo "#!/bin/sh" > ${INSTALL_PATH}/tools/check-redirector +- echo 'su ${SQUID_USER} -c "echo \"http://sex.ru 127.0.0.1/- - GET\" | ${INSTALL_PATH}/redirector ${INSTALL_PATH}/redirector.conf;"' >> ${INSTALL_PATH}/tools/check-redirector +- chmod 755 ${INSTALL_PATH}/tools/check-redirector ++ echo "#!/bin/sh" > ${DSTDIR_PATH}/tools/check-redirector ++ echo 'su ${SQUID_USER} -c "echo \"http://sex.ru 127.0.0.1/- - GET\" | ${INSTALL_PATH}/redirector ${INSTALL_PATH}/redirector.conf;"' >> ${DSTDIR_PATH}/tools/check-redirector ++ chmod 755 ${DSTDIR_PATH}/tools/check-redirector + +- echo "#!/bin/sh" > ${INSTALL_PATH}/tools/set-permissions +- echo 'chown -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}' >> ${INSTALL_PATH}/tools/set-permissions +- chmod 755 ${INSTALL_PATH}/tools/set-permissions ++ echo "#!/bin/sh" > ${DSTDIR_PATH}/tools/set-permissions ++ echo 'chown -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}' >> ${DSTDIR_PATH}/tools/set-permissions ++ chmod 755 ${DSTDIR_PATH}/tools/set-permissions + + +- cp tools/kill-cache ${INSTALL_PATH}/tools +- chmod 755 ${INSTALL_PATH}/tools/kill-cache ++ cp tools/kill-cache ${DSTDIR_PATH}/tools ++ chmod 755 ${DSTDIR_PATH}/tools/kill-cache + +- cp tools/benchmark ${INSTALL_PATH}/tools +- chmod 755 ${INSTALL_PATH}/tools/benchmark ++ cp tools/benchmark ${DSTDIR_PATH}/tools ++ chmod 755 ${DSTDIR_PATH}/tools/benchmark + +- cp tools/IN.gz ${INSTALL_PATH}/tools +- chmod 644 ${INSTALL_PATH}/tools/IN.gz ++ cp tools/IN.gz ${DSTDIR_PATH}/tools ++ chmod 644 ${DSTDIR_PATH}/tools/IN.gz + + # Set permissions +- chown -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH} +- chmod 770 ${INSTALL_PATH} +- chmod 644 ${INSTALL_PATH}/redirector.conf.dist +- chmod 755 ${INSTALL_PATH}/redirector +- chmod 755 ${INSTALL_PATH}/make-cache ++ chown -R ${SQUID_USER}:${SQUID_GROUP} ${DSTDIR_PATH} ${DSTDIR} ${DSTDIR}/var/log/squid/rejik ++ chmod 770 ${DSTDIR_PATH} ++ chmod 644 ${DSTDIR}/etc/squid/redirector.conf.dist ++ chmod 755 ${DSTDIR_PATH}/redirector ++ chmod 755 ${DSTDIR_PATH}/make-cache + |