The problem that I've always had is during the 'mysql < scripts/dbm/zm_update-1.22.0.sql' step it always complains about 'mysql' not found. It turns out that this is because the script sets the PATH to '/bin:/usr/bin'. My mysql lives in /usr/local/bin so I had to change the line
Code: Select all
$ENV{PATH} = '/bin:/usr/bin';
Code: Select all
$ENV{PATH} = '/bin:/usr/bin:/usr/local/bin';
Code: Select all
$prefix = "su ".ZM_WEB_USER." -c ";
$suffix = "'";
$command = $prefix.$null_command.$suffix;
Code: Select all
$prefix = "su ".ZM_WEB_USER." -c '";
$suffix = "'";
$command = $prefix.$null_command.$suffix;
As an aside, when running the sudo/su check it dumps all the output to the console which is a bit messy:
Code: Select all
Can't exec "sudo": No such file or directory at /usr/local/bin/zmpkg.pl line 252.
Use of uninitialized value in scalar chomp at /usr/local/bin/zmpkg.pl line 261.
Use of uninitialized value in concatenation (.) or string at /usr/local/bin/zmpkg.pl line 262.
/bin/sh: --shell=/bin/sh: invalid option
Usage: /bin/sh [GNU long option] [option] ...
/bin/sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option