#! /bin/sh #---------------------------------------------------------------------------- # inet-show-vuser - Show pure-ftpd virtual user # # Copyright (c) 2001-2005 Ansgar Püster # # Creation: 05.10.2003 ap # Last Update: $Id$ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # include eislib . /var/install/include/eislib inet_config=/etc/config.d/inet . $inet_config header() { clrhome mecho -info "Show pure-ftpd virtual user" } footer() { mecho /var/install/bin/ask "Continue" 'no' return $? } header if [ ! $FTP_ENABLE_VIRTUAL_USERS = 'yes' ]; then mecho -error "pure-ftpd virtual users are not enabled" mecho -error "no user can be selected" footer exit fi fini=false while [ $fini = 'false' ] do mecho /var/install/bin/ask "pure-ftpd virtual user" "" "+" > /tmp/result.$$ user="$(cat /tmp/result.$$)" rm -f /tmp/result.$$ if [ "$user" != '' ]; then if pure-pw show "$user" >/dev/null 2>&1; then pure-pw show "$user" else mecho -error "pure-ftpd virtual user $user does not exist" fi fi if footer; then header else fini=true fi done