diff --git a/docker-compose.yml b/docker-compose.yml index 364565b..b323a7e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,11 @@ --- ################################################################### #### # ## -# >> DOCKER-COMPOSE-GLFTPD-V3 :: WEBUI +# >> DOCKER-COMPOSE-GLFTPD-V4 :: WEBUI ################################################################### #### # ## # build args: # environment options: -# # uncomment any volumes to mount dirs from host -# optionally uncomment args e.g. additional ftp ports +# optionally uncomment build and env args, e.g. additional ftp ports ################################################################### #### # ## services: diff --git a/docker-run.sh b/docker-run.sh index 5dc2f59..b9e6a84 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -1,12 +1,13 @@ #!/bin/bash - +VERSION=V4 ################################## ################################ #### # ## -# >> DOCKER-RUN-GLFTPD-V3 :: WEBUI +# >> DOCKER-RUN-GLFTPD :: WEBUI ################################## ################################ #### # ## # ENVIRONMENT VARIABLES: # # GL_DATA="" basedir for gl bind mounts (default=./glftpd) -# ( to reuse existing install set to /glftpd ) +# gl/bot config and data is stored here +# GL_DIR="" optional path to (existing) gl install # WEBUI_LOCAL=1 run commands on same host, no gl docker [0|1] # WEBUI_AUTH_MODE="" auth mode [basic|glftpd|both|none] (basic) # NETWORK="" docker network mode [host|bridge] (bridge) @@ -14,14 +15,16 @@ # # WEBUI_ARGS+= " --any-other-flags " add any other docker run options # +# (*) to reuse existing install set GL_DATA to /glftpd +# ################################################################### #### # ## #DEBUG=0 #GL_DATA="./glftpd" -#GL_DIR="/glftpd" GLFTPD=0 WEBUI=1 #WEBUI_LOCAL=1 +#WEBUI_DBUS=0 #WEBUI_AUTH_MODE="basic" #NETWORK="host" DOCKER_REGISTRY="ghcr.io/silv3rr" @@ -80,7 +83,7 @@ else fi echo "----------------------------------------------" -echo "DOCKER-GLFTPD-RUN-V3" +echo "DOCKER-GLFTPD-RUN-${VERSION}" echo "----------------------------------------------" # set runtime docker args @@ -99,7 +102,6 @@ if [ -z "$NETWORK" ]; then fi fi - # local: check for existing glftpd install on host if [ "${WEBUI_LOCAL:-0}" -eq 1 ]; then if [ -z "$GL_DIR" ]; then diff --git a/local-install.sh b/local-install.sh index 59989c4..ef9ba7f 100755 --- a/local-install.sh +++ b/local-install.sh @@ -278,7 +278,7 @@ for i in assets lib templates; do $COPY -u -r "$i" "${WWW_ROOT}/${APPDIR}" done $MKDIR -v -p "${WWW_ROOT}/${APPDIR}/lib" -$COPY -u -r -v src/auth "${WWW_ROOT}/${AUTHDIR}" +$COPY -u -r -v src/auth/* "${WWW_ROOT}/${AUTHDIR}" #$COPY -u -r $AUTH_LIBS "${WWW_ROOT}/${AUTHDIR}/lib" $COPY -u -r -v README.md docs "${WWW_ROOT}/${APPDIR}/templates" if [ ! -s "${WWW_ROOT}${APPDIR}/config.php" ]; then diff --git a/src/ui/config.php b/src/ui/config.php deleted file mode 100644 index 3f6cbcd..0000000 --- a/src/ui/config.php +++ /dev/null @@ -1,86 +0,0 @@ - "both", - 'mode' => "local", - 'show_more_opts' => false, - 'show_alerts' => true, - 'max_items' => 10, - 'debug' => 0, - 'http_auth' => ['username' => 'shit' , 'password' => 'EatSh1t'], - 'spy' => ['enabled' => true, 'refresh' => true], - 'modal' => ["pywho" => true, "commands" => false], - 'title' => ' - GLFTPD: - - COMMAND CENTER', - 'services' => array( - "glftpd" => ['host' => "localhost", 'port' => "1336"], - "sitebot" => ['host' => "localhost", 'port' => "80"], - ), - - 'docker' => array( - 'api' => "http://localhost/v1.44", - 'glftpd_container' => "glftpd-webui-dev-glftpd-1", - 'bin_dir' => "/glftpd/bin", - 'filemanager' => array( - 'dirs' => array ( - 'Glftpd Site' => 'glftpd/site', - ), - 'files' => array ( - 'glftpd.conf' => 'glftpd', - 'eggdrop.conf' => 'glftpd/sitebot', - 'ngBot.conf' => 'glftpd/sitebot/pzs-ng', - ) - ) - ), - - 'local' => array( - 'runas' => "/usr/bin/sudo -n -u root", - 'bin_dir' => "/usr/local/bin", - 'glftpd_dir' => "/glftpd", - 'glftpd_etc' => "/etc", - 'glftpd_conf' => "glftpd.conf", - 'env_bus' => "/usr/bin/env SYSTEMCTL_FORCE_BUS=1", - 'filemanager' => array( - 'dirs' => array ( - 'Glftpd Site' => '/glftpd/site', - ), - 'files' => array ( - 'glftpd.conf' => '/etc/', - 'eggdrop.conf' => '/glftpd/sitebot', - 'ngBot.conf' => '/glftpd/sitebot/pzs-ng', - ), - ) - ), - 'ui_buttons' => array( - 'glftpd' => array( - 'Status' => ['cmd' => 'glftpd_status'], - 'Start' => ['cmd' => 'glftpd_start'], - 'Stop' => ['cmd' => 'glftpd_stop'], - 'Restart' => ['cmd' => 'glftpd_restart'], - ), - 'docker_cmd' => array( - 'Create' => ['cmd' => 'docker_create_glftpd', 'disabled' => true ], - 'Inspect' => ['cmd' => 'docker_inspect_glftpd'], - 'Top' => ['cmd' => 'docker_top_glftpd'], - 'Kill' => ['cmd' => 'docker_kill_glftpd'], - 'Tail logs' => ['cmd' => 'docker_tail_glftpd'], - 'View logs' => ['cmd' => 'docker_logs_glftpd'], - ), - 'term_cmd' => array( - 'sitewho' => ['cmd' => 'pywho', 'sep' => true ], - 'telnet bot' => ['cmd' => 'tty_eggdrop', 'sep' => true ], - 'useredit' => ['cmd' => 'tty_useredit'], - 'gl_spy' => ['cmd' => 'tty_glspy'], - 'py_spy' => ['cmd' => 'tty_pyspy', 'sep' => true ], - 'close tty' => ['cmd' => 'kill_gotty', 'sep' => true ], - ), - ), -); diff --git a/src/ui/index.php b/src/ui/index.php index 6aded65..5a68ade 100644 --- a/src/ui/index.php +++ b/src/ui/index.php @@ -42,7 +42,6 @@ $data = new data; // TODO: change config with form and or env vars - /* change config, example: $config = cfg::load(); $config = cfg::set($config, 'auth', 'none');