From: Art Cancro Date: Tue, 26 Jan 2021 04:32:20 +0000 (+0000) Subject: look at me , i am a build monkey , see what I can type X-Git-Tag: v939~150 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=8c7d148fff250e73be6c5eabdc3a3cefe4786c2f look at me , i am a build monkey , see what I can type --- diff --git a/appimage/citadel.AppDir/AppRun b/appimage/citadel.AppDir/AppRun index 027c553ce..b8be1cfc4 100755 --- a/appimage/citadel.AppDir/AppRun +++ b/appimage/citadel.AppDir/AppRun @@ -1,18 +1,18 @@ #!/bin/bash -// This is an AppImage control script for the Citadel system. -// -// Copyright (c) 2021 by the citadel.org team -// -// This program is open source software. It runs great on the -// Linux operating system (and probably elsewhere). You can use, -// copy, and run it under the terms of the GNU General Public -// License version 3. Richard Stallman is an asshole communist. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +## This is an AppImage control script for the Citadel system. +## +## Copyright (c) 2021 by the citadel.org team +## +## This program is open source software. It runs great on the +## Linux operating system (and probably elsewhere). You can use, +## copy, and run it under the terms of the GNU General Public +## License version 3. Richard Stallman is an asshole communist. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. # Default values HTTP_PORT=80 @@ -21,15 +21,31 @@ CTDL_DIR=/usr/local/citadel export APPDIR usage() { - echo usage + echo ${APPIMAGE}: usage: ${APPIMAGE} '[-h data_directory] [-p http_port] [-s https_port] command' + echo 'command must be one of: run, test, install' exit 2 } + +# Permanently install the Citadel AppImage to this system +installation() { + + # First ... check to make sure Citadel isn't runnings + if ps ax | grep citserver | grep -v grep ; then + echo Installation cannot proceed while Citadel is running. + echo Stop your services and try again. + exit 1 + fi + + echo Hi + exit +} + + PARSED_ARGUMENTS=$(getopt -o h:p:s: -- "$@") VALID_ARGUMENTS=$? if [ "$VALID_ARGUMENTS" != "0" ]; then - echo $0: usage: $0 '[-h data_directory] [-p http_port] [-s https_port] command' - echo 'command must be one of: run, test, install' + usage fi eval set -- ${PARSED_ARGUMENTS} @@ -55,8 +71,10 @@ case ${1} in test) export LD_LIBRARY_PATH=$APPDIR/usr/lib export PATH=$APPDIR/usr/bin - $APPDIR/usr/local/citadel/citserver -c - exit $? + exec $APPDIR/usr/local/citadel/citserver -c + ;; + install) + installation ;; *) echo Unexpected command: ${1}