webhookd icon indicating copy to clipboard operation
webhookd copied to clipboard

my nfs server can't found the script

Open JovanyNegocio opened this issue 4 years ago • 3 comments
trafficstars

Hi When I execute: curl -v -XPOST http://localhost:8080/foo/bar I receive this error: ERR 2021/08/12 13:49:06.514247 Script not found: scripts/foo/bar

JovanyNegocio avatar Aug 12 '21 13:08 JovanyNegocio

Can you share your configuration? Scripts directory location is certainly not properly set. By default, the daemon searches for scripts in the ./scripts directory. You can change this location using the command parameter --scripts or the env variable WHD_SCRIPTS.

ncarlier avatar Aug 13 '21 14:08 ncarlier

@ncarlier thank you so much for your time. flow my scripts configuration:

[root@server-test scripts]# pwd /root/scripts [root@server-test scripts]# tree . └── foo └── bar.sh

1 directory, 1 file [root@server-test scripts]#

Ps1: I'm using centos. Ps2: the script "bar.sh" is into foo folder

JovanyNegocio avatar Aug 16 '21 11:08 JovanyNegocio

How do you start webhookd? You should start webhookd like this:

webhookd --scripts /root/scripts`

or like this:

export WHD_SCRIPTS=/root/scripts
webhookd

or if your current dir is /root:

pwd
# /root
webhookd

Make sure that bar.sh is executable: chmod +x bar.sh.

PS: please consider using another user than root to run webhookd. It is risky in terms of security (unless you are perfectly chrooted or sandboxed).

ncarlier avatar Aug 29 '21 08:08 ncarlier