From 6f1e0c89501aa95ff55e83ebfca511fdd1ead0ca Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 25 Jan 2021 00:10:16 +0000 Subject: [PATCH] working on the options --- appimage/build_appimage.sh | 2 ++ appimage/ctdlvisor.c | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/appimage/build_appimage.sh b/appimage/build_appimage.sh index ae54bb2a3..d2d181909 100755 --- a/appimage/build_appimage.sh +++ b/appimage/build_appimage.sh @@ -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 diff --git a/appimage/ctdlvisor.c b/appimage/ctdlvisor.c index 3884f7072..7bcf5efbd 100644 --- a/appimage/ctdlvisor.c +++ b/appimage/ctdlvisor.c @@ -24,6 +24,8 @@ #include #include #include +#include +#include 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); -- 2.30.2