summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar grunfink2025-09-07 08:03:38 +0200
committerGravatar grunfink2025-09-07 08:03:38 +0200
commitc541296f25f2c67bbefe5a9a93c5ee6e20ef7012 (patch)
tree63f533cccdaeb05c49fc52d43f32cc05dda237ac /main.c
parentBumped version. (diff)
downloadsnac2-c541296f25f2c67bbefe5a9a93c5ee6e20ef7012.tar.gz
snac2-c541296f25f2c67bbefe5a9a93c5ee6e20ef7012.tar.xz
snac2-c541296f25f2c67bbefe5a9a93c5ee6e20ef7012.zip
New command-line option 'fsck'.
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index f767355..19cfe1a 100644
--- a/main.c
+++ b/main.c
@@ -34,6 +34,7 @@ int usage(const char *cmd)
34 "httpd {basedir} Starts the HTTPD daemon\n" 34 "httpd {basedir} Starts the HTTPD daemon\n"
35 "purge {basedir} Purges old data\n" 35 "purge {basedir} Purges old data\n"
36 "state {basedir} Prints server state\n" 36 "state {basedir} Prints server state\n"
37 "fsck {basedir} Performs a non-destructive data integrity check\n"
37 "webfinger {basedir} {account} Queries about an account (@user@host or actor url)\n" 38 "webfinger {basedir} {account} Queries about an account (@user@host or actor url)\n"
38 "queue {basedir} {uid} Processes a user queue\n" 39 "queue {basedir} {uid} Processes a user queue\n"
39 "follow {basedir} {uid} {actor} Follows an actor\n" 40 "follow {basedir} {uid} {actor} Follows an actor\n"
@@ -200,6 +201,11 @@ int main(int argc, char *argv[])
200 return 0; 201 return 0;
201 } 202 }
202 203
204 if (strcmp(cmd, "fsck") == 0) { /** **/
205 data_fsck();
206 return 0;
207 }
208
203 if ((user = GET_ARGV()) == NULL) 209 if ((user = GET_ARGV()) == NULL)
204 return usage(cmd); 210 return usage(cmd);
205 211