diff options
Diffstat (limited to 'services/git-add-user')
-rwxr-xr-x | services/git-add-user | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/services/git-add-user b/services/git-add-user new file mode 100755 index 0000000..2e500d2 --- /dev/null +++ b/services/git-add-user @@ -0,0 +1,14 @@ +#! /usr/bin/bash + +set -e + +script_dir="$(dirname "$0")" +. "$script_dir/common.bash" + +ps_dir="$CRUPEST_PROJECT_DIR/$CRUPEST_DATA_DIR/git/private" +ps_file="$ps_dir/user-info" +echo "Password file at $ps_file" +[[ -d "$ps_dir" ]] || mkdir -p "$ps_dir" +[[ -f "$ps_file" ]] || touch "$ps_file" + +exec docker run -it --rm -v "$ps_file:/user-info" httpd htpasswd "/user-info" "$1" |