Fix code styling

This commit is contained in:
Tim Robinson
2017-07-29 13:11:44 +10:00
parent 56675e6eec
commit a77eae39d3
2 changed files with 26 additions and 25 deletions

View File

@@ -2,22 +2,22 @@
set -e
[ "$DEBUG" == 'true' ] && set -x
[[ "${DEBUG}" == 'true' ]] && set -x
DB=/etc/vsftpd/virtual-users.db
if [ "$#" -lt 2 ] || [ "$#" -gt 3 ]; then
echo "Usage: $0 [-d] <user> <password>" >&2
echo >&2
echo "[ -d ] Delete the database first" >&2
exit 1
if [[ "$#" -lt 2 || "$#" -gt 3 ]]; then
echo "Usage: $0 [-d] <user> <password>" >&2
echo >&2
echo "[ -d ] Delete the database first" >&2
exit 1
fi
if [ "$1" == "-d" ]; then
if [ -f $DB ]; then
rm $DB
fi
shift
if [[ "${1}" == "-d" ]]; then
if [[ -f "${DB}" ]]; then
rm "${DB}"
fi
shift
fi
echo -e "$1\n$2" | db5.3_load -T -t hash $DB
echo -e "${1}\n${2}" | db5.3_load -T -t hash "${DB}"