WARNING: Can not execute post script: 1

Help
2009-07-01
2013-01-14
  • Eredicatorx

    Eredicatorx - 2009-07-01

    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>

     
    • wimpunk

      wimpunk - 2009-07-01

      If the script fails, you should get an error like "WARNING:  Can not execute post script: /home/erin/conf/bin/proftpd-update.sh"  Since it doesn't do that, I would suggest you to put the postscript parameter in the configuration file and don't add it to commandline.  I know for sure it should work with the latest release and with the postscript added in the config file.  I din't tried it as a parameter to the command line.

       
      • Eredicatorx

        Eredicatorx - 2009-07-02

        Thanks that worked!
        I was using my old conf and had just upgraded the perl script.
        Thanks again.

        E./

         

Log in to post a comment.