summaryrefslogtreecommitdiffstats
path: root/www/cgi-bin/cli
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-12-30 14:33:49 +0000
committerTed Trask <ttrask01@yahoo.com>2009-12-30 14:33:49 +0000
commit6c9f16f82e911e1b2c05918f9b8ce0d78fb3aa55 (patch)
tree30dc8373ce37fab5ac71d2a7b2902da0c3535e65 /www/cgi-bin/cli
parent38c8fad89c24a031b4c88e94066797a00b7774ab (diff)
downloadacf-core-6c9f16f82e911e1b2c05918f9b8ce0d78fb3aa55.tar.bz2
acf-core-6c9f16f82e911e1b2c05918f9b8ce0d78fb3aa55.tar.xz
Cleaned up acf.conf, removed hardcoded /usr/share/acf paths.
Diffstat (limited to 'www/cgi-bin/cli')
-rwxr-xr-xwww/cgi-bin/cli5
1 files changed, 4 insertions, 1 deletions
diff --git a/www/cgi-bin/cli b/www/cgi-bin/cli
index 9e8ce02..1221481 100755
--- a/www/cgi-bin/cli
+++ b/www/cgi-bin/cli
@@ -18,8 +18,11 @@ Output will be a serialized Lua table.
return
end
+require("posix")
local PATH = package.path
-package.path = "/usr/share/acf/www/cgi-bin/?.lua;" .. package.path
+local p = posix.dirname(arg[0])
+if p:sub(1,1) ~= "/" then p = posix.getcwd().."/"..p end
+package.path = p.."/?.lua;" .. package.path
require("mvc")
package.path = PATH