good morning everybody,
so how should it be diffrent, I just have some errors which wanted to be solved, but I'm a bad programmer so I need you once more but think I have a good hint this time
so current error looks like this
just the tail of the DEBUG
Code:
DEBUG: push_el() sub_name: sys_command_rs(), msg: Starting...
DEBUG: push_el() sub_name: sys_command_rs(), msg: Ending...
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
DEBUG: push_el() sub_name: sys_command('/bin/cp -p /usr/local/etc/ispcp/postfix/backup/main.cf.ispcp /usr/local/etc/postfix/main.cf'), msg: Ending...
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
DEBUG: push_el() sub_name: sys_command('/bin/cp -p /usr/local/etc/ispcp/postfix/backup/master.cf.ispcp /usr/local/etc/postfix/master.cf'), msg: Ending...
DEBUG: push_el() sub_name: setfmode(), msg: Starting...
DEBUG: push_el() sub_name: setfmode(), msg: Ending...
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
cp: /usr/local/etc/ispcp/postfix/ispcp/{aliases,domains,mailboxes,transport,sender-access}: No such file or directory
DEBUG: push_el() sub_name: sys_command(), msg: ERROR: External command '/bin/cp -p /usr/local/etc/ispcp/postfix/ispcp/{aliases,domains,mailboxes,transport,sender-access} /usr/local/etc/postfix/ispcp' returned '1' status !
DEBUG: pop_el() sub_name: sys_command(), msg: ERROR: External command '/bin/cp -p /usr/local/etc/ispcp/postfix/ispcp/{aliases,domains,mailboxes,transport,sender-access} /usr/local/etc/postfix/ispcp' returned '1' status !
ERROR: External command '/bin/cp -p /usr/local/etc/ispcp/postfix/ispcp/{aliases,domains,mailboxes,transport,sender-access} /usr/local/etc/postfix/ispcp' returned '1' status !
but I think I know how to solve but don't how to write in the script.
first of all for this thing is that we change to directory
Code:
cd /usr/local/etc/ispcp/postfix/ispcp/
The syntax for working cp command here should be like
Code:
cp -p aliases domains mailboxes transport sender-access /usr/local/etc/postfix/ispcp
the changes should be around here in ispcp-setup-methods.pl
Code:
$cmd = "$main::cfg{'CMD_CP'} -p $vrl_dir/{aliases,domains,mailboxes,transport,sender-access} $main::cfg{'MTA_VIRTUAL_CONF_DIR'}";
$rs = sys_command($cmd);
return $rs if ($rs != 0);
$cmd = "$main::cfg{'CMD_CP'} -p $vrl_dir/{aliases,domains,mailboxes,transport,sender-access} $wrk_dir";
$rs = sys_command($cmd);
return $rs if ($rs != 0);
$cmd = "$main::cfg{'CMD_POSTMAP'} $main::cfg{'MTA_VIRTUAL_CONF_DIR'}/{aliases,domains,mailboxes,transport,sender-access} &> /tmp/ispcp-setup-services.log";
$rs = sys_command($cmd);
return $rs if ($rs != 0);
But its just an idea, maybe it can help, otherway I'm sure you solve it somehow