whats wrong with this sh script?

hehachris

Verified User
Joined
Nov 24, 2004
Messages
538
Location
Hong Kong
DA always shows "install.sh returned a non-zero value:" >"<
and the file was not chmod ed/chown ed at all

Code:
#!/bin/sh

cd $DOCUMENT_ROOT;
cd ..

for dir in admin user; do
{
        chmod 755 $dir/*;
        chown diradmin:diradmin $dir/*;
}
done;

chmod 666 admin/pgsql.conf;

cd ..

chown -R diradmin:diradmin pgsql;

echo "Plugin installed!";

exit 0;
 
: command not found2:
: command not found3:
: No such file or directory.
: command not found5:
'/install.sh: line 6: syntax error near unexpected token `do
'/install.sh: line 6: `for dir in admin user; do


no idea =(
 
hostpc.com said:
Where did you get the script? Looks to be a postgresql plugin?
yea i just wrote a pgsql plugin for DA
the plugin has been finished and tested on my box
but i cant get work with the install script so i cant release it
 
This line:
Code:
for dir in admin user;
doesn't look right to me. I'd think that admin user is wrong; I think there's a space that shouldn't be there.

But what do I know :(

When something like this happens I try putting in stops to see how far the code gets before it finds a problem. And even inserting code to print out variables.

Kind of simple debugging.

Jeff
 
Hmm... I just got around to trying it on my computer and it worked just fine. Exactly what you have in your first post....
 
Back
Top