Author: Rolf Leggewie <foss@rolf.leggewie.biz>

Scripts should live under /usr not in /etc

diff --git a/src/scanbd/config.c b/src/scanbd/config.c
index aa24779..5608be6 100644
--- a/src/scanbd/config.c
+++ b/src/scanbd/config.c
@@ -170,8 +170,8 @@ char *make_script_path_abs(const char *script) {
         const char* scriptdir =  cfg_getstr(cfg_sec_global, C_SCRIPTDIR);
 
         if(!scriptdir || (strlen(scriptdir) == 0)) {
-            // scriptdir is not set, script is relative to SCANBD_CFG_DIR
-            snprintf(script_abs, PATH_MAX, "%s/%s", SCANBD_CFG_DIR, script);
+            // scriptdir is not set, look for scripts in /usr/share/scanbd/scripts
+            snprintf(script_abs, PATH_MAX, "/usr/share/scanbd/scripts/%s", script);
         } else if (scriptdir[0] == '/') {
             // scriptdir is an absolute path
             snprintf(script_abs, PATH_MAX, "%s/%s", scriptdir, script);
