1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-17 14:37:02 +00:00

chasquid-util: Make the commands more user-friendly

This patch changes chasquid-util's subcommands and parameters to
(hopefully) make them more user friendly and intuitive by default.

The changes include defaulting the configuration to /etc/chasquid, and
using full addresses as usernames.

It also adds some shell tests to cover most of the functionality.
This commit is contained in:
Alberto Bertogli
2016-10-17 01:01:23 +01:00
parent febe96697a
commit f38ae47164
4 changed files with 141 additions and 47 deletions

View File

@@ -42,7 +42,8 @@ function add_user() {
CONFDIR="${CONFDIR:-config}"
mkdir -p "${CONFDIR}/domains/${1}/"
go run ${TBASE}/../../cmd/chasquid-util/chasquid-util.go \
adduser "${CONFDIR}/domains/${1}/users" "${2}" \
-C "${CONFDIR}" \
user-add "$2@$1" \
--password "${3}" \
>> .add_user_logs
}