sleinen / samplicator

Send copies of (UDP) datagrams to multiple receivers, with optional sampling and spoofing
GNU General Public License v2.0
389 stars 132 forks source link

startup script for systemd #44

Closed cbueche closed 7 years ago

cbueche commented 7 years ago

Dear Simon,

here a very modest contribution, a startup script for CentOS (other systemd-based Linux could use it as well).

Regards, Charles

zzaflemi commented 7 years ago

@cbueche thanks for the script. I'm using it. One minor suggestion. Put the -S option (and maybe all options) before the -c config file. I don't know why, but at least on my CentOS system if I don't put the -S option first then it does not actually do the source address spoofing.

sleinen commented 7 years ago

Dear Charles (@cbueche),

thanks for the contribution! And sorry for the late reply; I was asleep at the wheel.

This is becoming very useful as more and more systems adopt systemd. I'll happily merge it, but I'd like you to address @zzaflemi's comment first. For better or (probably) worse, samplicator's argument parsing is "stateful", so the -S option only affects destinations that follow it. Therefore the -S should generally precede those destinations, whether they are specified via a conf file or directly on the command line. Thanks!

cbueche commented 7 years ago

Hello Simon and Andy,

thanks for the feedback. I have fixed my script and reformatted the doc. Pull request is ready I think.

Regards, Charles

sleinen commented 7 years ago

@cbueche: may I mention you as a contributor in the AUTHORS file?

cbueche commented 7 years ago

sure go ahead. Charles Bueche <bueche@netnea.com>