From 159023b540f9d19461688bfe41fc864acf26c74a Mon Sep 17 00:00:00 2001 From: Chen-I Lim Date: Wed, 20 Jan 2021 14:22:23 -0800 Subject: [PATCH] Example reset-password.sh script --- server/scripts/reset-password.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 server/scripts/reset-password.sh diff --git a/server/scripts/reset-password.sh b/server/scripts/reset-password.sh new file mode 100755 index 000000000..6b4891ad9 --- /dev/null +++ b/server/scripts/reset-password.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +if [[ $# < 2 ]] ; then + echo 'reset-password.sh ' + exit 1 +fi + +curl --unix-socket /var/tmp/octo_local.socket http://localhost/api/v1/admin/users/$1/password -X POST -H 'Content-Type: application/json' -d '{ "password": "'$2'" }'