From: Nishi Date: Wed, 21 Aug 2024 01:18:45 +0000 (+0000) Subject: update check.c X-Git-Url: https://git.chaotic.ninja/gitweb/nishi/?a=commitdiff_plain;h=3cf19c78091fc2527c1ed52c290eeb4868d6c5bf;p=repoview.git update check.c git-svn-id: file:///raid/svn-personal/repoview/trunk@8 7e8b2a19-8934-dd40-8cb3-db22cdd5a80f --- diff --git a/check.c b/check.c index e838a3f..81db51f 100644 --- a/check.c +++ b/check.c @@ -73,6 +73,19 @@ int check_auth(void) { return 0; } +int check_files(void) { + int st = 0; +#ifndef APACHE_PASSWD + fprintf(stderr, "Apache htpasswd file is not set.\n"); + st = 1; +#endif +#ifndef APACHE_AUTHZ + fprintf(stderr, "Apache authz file is not set.\n"); + st = 1; +#endif + return st; +} + int main() { int st; st = check_db(); @@ -81,6 +94,8 @@ int main() { if(st != 0) goto fail; st = check_theme(); if(st != 0) goto fail; + st = check_files(); + if(st != 0) goto fail; printf("Config validation successful.\n"); return 0; fail: diff --git a/config.h.tmpl b/config.h.tmpl index 2b89ecd..76840b4 100644 --- a/config.h.tmpl +++ b/config.h.tmpl @@ -48,6 +48,9 @@ /* Apache htpasswd file. */ #define APACHE_PASSWD "/www/passwd" +/* Apache authz file. */ +#define APACHE_AUTHZ "/www/authz" + #endif /*