Read and respond to this message at:
https://sourceforge.net/forum/message.php?msg_id=7473224
By: eredicatorx
I am trying to create a postscript that changes my IP in the masquerade field
of my proftpd.conf
When I run the script it works as it should. It takes the first argument and
seds it into a mock proftpd.conf and then copies the file to the conf directory.
I checked that the script is executable. I have tried to start it using the
following arguments, like
ddclient -debug -syslog -cache /home/erin/conf/ddclient/cache/ddclient.cache
-postscript /home/erin/conf/bin/proftpd-update.sh
I also added the path to the postscript section in the perl file at line 585
[ "postscript", "/home/erin/conf/bin/proftpd-update.sh", "-postscript
: script to run after updating ddclient, has new IP as param" ],
Which of course did not work.
Finally I straced the program and still could not find anything usefull to tell
me why the program was failing. If anyone can help I would apperciate it. The
shell script below works well for what I need, others are welcome to try it out.
<script>
#!/bin/bash -x
IP=$1
WORKDIR=/home/erin/conf/proftpd/
PROFTPDHOME=/etc/proftpd/
CACHEFILE=/var/cache/ddclient/ddclient.cache
#awk -F, '{ print $5}' $CACHEFILE | sed "s#
cd $WORKDIR
sed "s#MasqueradeAddress MASKADD#MasqueradeAddress ${IP}#" proftpd.conf-working
> proftpd.conf
cp proftpd.conf $PROFTPDHOME
/sbin/service proftpd restart
exit
</script>
______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
https://sourceforge.net/forum/unmonitor.php?forum_id=399428
|