Code Monkey home page Code Monkey logo

Comments (10)

roehling avatar roehling commented on May 30, 2024

Hey, thank you very much for your contribution. I will add it as soon as I am back at my computer. :-) Happy holidays!

from postsrsd.

roehling avatar roehling commented on May 30, 2024

I am unable to access the provided link. Is your server down?

from postsrsd.

amiga600 avatar amiga600 commented on May 30, 2024

Confirmed, I can't download it too.

from postsrsd.

timeos avatar timeos commented on May 30, 2024

it is still up all the time.. maybe IPv6 problem. please try this: http://194.160.142.50/trash/postsrsd.redhat.init . If not work, just send tell me email and I will provide it shortly.

from postsrsd.

roehling avatar roehling commented on May 30, 2024

I re-inserted the macros for consistency with the other init scripts. Could you test this and give me feedback if something went wrong?

from postsrsd.

roehling avatar roehling commented on May 30, 2024

After looking up the daemon command, I decided not to add the install path to the PATH environment variable and run the daemon with the full path instead. Also, I did not put all command line arguments into a single OPTS variable, because this messes up the shell quotation if an option contains spaces (e.g. SRS_EXCLUDE_DOMAINS).

from postsrsd.

timeos avatar timeos commented on May 30, 2024

because this messes up the shell quotation if an option contains spaces (e.g. SRS_EXCLUDE_DOMAINS).

what is the problem here? I am using several excluded domains and if I've look on running process arguments it looks like this:
postsrsd -d -4 -f10001 -r10002 -dexample.com -s/etc/postsrsd.secret -unobody -p/var/run/postsrsd.pid -c/usr/local/lib/postsrsd -X.example.com example.org example.local -D

it is something wrong with this example?

Two more things:

Firstly this script is not counting with case, there SRS_EXCLUDE_DOMAINS list will be empty. Something like following test:

if [ -n "${SRS_EXCLUDE_DOMAINS}" ]
then
OPT_EXCL_DOMAINS="-X${SRS_EXCLUDE_DOMAINS}"
fi

...
daemon $DAEMON -4 -f"$SRS_FORWARD_PORT" -r"$SRS_REVERSE_PORT" -d"$SRS_DOMAIN" -s"$SRS_SECRET"
-u"$RUN_AS" -p"$PIDFILE" -c"$CHROOT" -D ${OPT_EXCL_DOMAINS}
...

Secondly: with "set -e" the init script is simply not working at all. It exits on ". /etc/init.d/functions". Not sure if "set -e" is the usual part of redhat init scripts. That was the reason why I decided to remove this line at beginning.

from postsrsd.

roehling avatar roehling commented on May 30, 2024

postsrsd -X.example.com example.org example.local
it is something wrong with this example?

There was a bug in the command line parser: the first argument is used for -X, and the subsequent arguments are parsed as positional arguments, which were silently ignored. I added a check for that in ea35d05

this script is not counting with case, there SRS_EXCLUDE_DOMAINS list will be empty.

The -X argument may have an empty list, so the script does not have to check.

from postsrsd.

roehling avatar roehling commented on May 30, 2024

I forgot to answer the original question: The domain list has to be double-quoted to be parsed by the shell as single word and given as a single argument to the -X option. The indirection with the OPTS variable makes that impossible.

from postsrsd.

timeos avatar timeos commented on May 30, 2024

Ok, understand, "-X" can be used even without any list of domains. Tested and it is working. Thanks.

from postsrsd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.