]> Git repositories of Nishi - repoview.git/commitdiff
update check.c
authorNishi <nishi@nishi.boats>
Wed, 21 Aug 2024 01:18:45 +0000 (01:18 +0000)
committerNishi <nishi@nishi.boats>
Wed, 21 Aug 2024 01:18:45 +0000 (01:18 +0000)
git-svn-id: file:///raid/svn-personal/repoview/trunk@8 7e8b2a19-8934-dd40-8cb3-db22cdd5a80f

check.c
config.h.tmpl

diff --git a/check.c b/check.c
index e838a3f6f2be5b3c10878b5e8cedd365845afa6e..81db51ffd68f2503d5e97ac3d678cae912fcfa73 100644 (file)
--- 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:
index 2b89ecd00c4f51ee7889a06e42b46fd6ab779a37..76840b48e4f58d571807a820de2203ed1944c800 100644 (file)
@@ -48,6 +48,9 @@
 /* Apache htpasswd file. */
 #define APACHE_PASSWD "/www/passwd"
 
+/* Apache authz file. */
+#define APACHE_AUTHZ "/www/authz"
+
 #endif
 
 /*