Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#237 postfixadmin-cli wont find dependent php file

closed-fixed
nobody
Core (82)
5
2013-12-01
2011-03-21
john doe
No

Looking for CLI tool of postfixadmin I found the wiki entry. If I do

Installed by source
chmod +x <path/to/postfixadmin/root>/scripts/postfixadmin-cli
ln -s <path/to/postfixadmin/root>/scripts/postfixadmin-cli /usr/bin/postfixadmin-cli
Call postfixadmin-cli

the result is:

Could not open input file: /usr/bin/postfixadmin-cli.php

Discussion

  • You can use the parameter
    -webroot /path/to/postfixadmin/scripts/

    That said: We need a better way to handle this, but I'm not sure about the best method. Possible options include:
    - a config file in /etc/postfixadmin that holds the path
    - test if $0 is a symlink, if yes, call readlink on it
    - combination of both (if config file exists, use it, otherwise use readlink)
    - (other ideas?)

     
  • john doe
    john doe
    2011-03-21

    I think the second one (test if $0 is a symlink, if yes, call readlink on it) will be the best. The most distribution will set the symlink by her own and an additional config file will be too much for tools.

     
  • Fixed in SVN r1023 (using readlink).

    Thanks for your report and the feedback!

     
    • status: open --> closed-fixed