X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=appimage%2Fcitadel.AppDir%2FAppRun;h=9c17f828df78596957e39a71eee2d99dc4590118;hb=a4889715724de08aca6ff61df5250b5b74e43a1c;hp=25205607933ea3626ff1cffa600be0fe5405160b;hpb=a112ae0472a232be5484c7a9aafc5a880a361c34;p=citadel.git diff --git a/appimage/citadel.AppDir/AppRun b/appimage/citadel.AppDir/AppRun index 252056079..9c17f828d 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. +# +# 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 @@ -23,7 +23,7 @@ ulimit -c unlimited usage() { echo ${APPIMAGE}: usage: ${APPIMAGE} '[-h data_directory] [-p http_port] [-s https_port] command' - echo 'command must be one of: run, test, install' + echo 'command must be one of: run, test, install, database_cleanup, migrate' exit 2 } @@ -194,6 +194,32 @@ case ${1} in install) installation ;; + database_cleanup) + export LD_LIBRARY_PATH=$APPDIR/usr/lib + export PATH=$APPDIR/usr/bin:$PATH + exec $APPDIR/usr/local/citadel/database_cleanup.sh -h $CTDL_DIR + ;; + migrate) + export APPDIR CTDL_DIR HTTP_PORT HTTPS_PORT + export LD_LIBRARY_PATH=$APPDIR/usr/lib + export PATH=$APPDIR/usr/bin + exec ctdlvisor -m -h $CTDL_DIR + ;; + mount) + echo This mode of operation mounts the AppImage but does not run anything. + echo -n Kill it when you are finished... + while true + do + sleep 1 + done + ;; + debug) + echo Connecting to the debugger + echo Try this: run -x9 -h $CTDL_DIR + export LD_LIBRARY_PATH=$APPDIR/usr/lib + export PATH=$APPDIR/usr/bin:$PATH + exec $APPDIR/usr/bin/gdb $APPDIR/usr/local/citadel/citserver + ;; *) echo Unexpected command: ${1} usage