working on the options
authorArt Cancro <ajc@citadel.org>
Mon, 25 Jan 2021 00:10:16 +0000 (00:10 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 25 Jan 2021 00:10:16 +0000 (00:10 +0000)
appimage/build_appimage.sh
appimage/ctdlvisor.c

index ae54bb2a347b95132409ca8cbe05dbe6ae7abc04..d2d181909c395f232efa20c877f4c04a2b921d1a 100755 (executable)
@@ -59,6 +59,8 @@ cc ctdlvisor.c -o citadel.AppDir/usr/bin/ctdlvisor || exit 1
 cpu=`uname -p`
 if [ $cpu == x86_64 ] ; then
        ARCH=x86_64 appimagetool citadel.AppDir/
+       md5sum Citadel-x86_64.AppImage | awk ' { print $1 } ' >Citadel-x86_64.AppImage.md5
 else
        ARCH=ARM appimagetool citadel.AppDir/
+       md5sum Citadel-armhf.AppImage | awk ' { print $1 } ' >Citadel-armhf.AppImage.md5
 fi
index 3884f7072b614086ba8f7e2bcf9ce0da9e4e9cd8..7bcf5efbd29d50bf5206237496d0d7677d851cfd 100644 (file)
@@ -24,6 +24,8 @@
 #include <signal.h>
 #include <string.h>
 #include <limits.h>
+#include <sys/types.h>
+#include <sys/stat.h>
 
 void main_loop(void);
 void run_in_foreground(void);
@@ -152,7 +154,11 @@ pid_t start_webcits() {
 
 static char *usage =
        "ctdlvisor: usage: ctdlvisor [-h data_directory] [-p http_port] [-s https_port] command\n"
-       "           'command' must be one of: run, install, start, stop\n"
+       "           'command' must be one of:\n"
+       "           run     - start Citadel services in the foreground without detaching\n"
+       "           install - deploy systemd unit files for automatic startup at boot\n"
+       "           upgrade - check for new version of the software\n"
+       "           test    - check this appimage for compatibility with your system\n"
 ;
 
 int main(int argc, char **argv) {
@@ -182,6 +188,15 @@ int main(int argc, char **argv) {
        if (!strcasecmp(argv[optind], "run")) {
                run_in_foreground();
        }
+       else if (!strcasecmp(argv[optind], "install")) {
+               fprintf(stderr, "oops, this is not implemented yet\n");
+       }
+       else if (!strcasecmp(argv[optind], "upgrade")) {
+               fprintf(stderr, "oops, this is not implemented yet\n");
+       }
+       else if (!strcasecmp(argv[optind], "test")) {
+               fprintf(stderr, "oops, this is not implemented yet\n");
+       }
        else {
                fprintf(stderr, "%s", usage);
                exit(1);