run external command on ip change

Help
2004-10-27
2013-01-14
  • Nobody/Anonymous

    hi I need to restart my proftpd after ip change to make passive ftp connections work. Where can I put the command "/etc/initd./protftpd restart"

    regards

    Jasper

     
    • Nobody/Anonymous

      Sorry,

      there's no such feature in ddclient.  If you add it as a feature request maybe I'll find some time to create that feature.  Meanwhile you can try a script like

      #!/bin/bash
      MYCACHE=/tmp/mycache
      DDCACHE=/etc/ddclient.cache

      test -e ${MYCACHE} || touch ${MYCACHE}

      while sleep 30
      do
      test ${DDCACHE} -nt ${MYCACHE} && /etc/init.d/proftpd restart
      done

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks