Files
freeipa/install/ui/test/bin/update_ipa_init.sh
T
Endi S. Dewata f168afbeb6 Removed HBAC deny rule warning.
The HBAC deny rule is no longer supported so it's no longer necessary
to show the warning.

Ticket #1444
2011-10-26 12:53:28 +00:00

53 lines
987 B
Bash
Executable File

#!/bin/bash
FIXTURE_DIR=$1
INIT_FILE=$FIXTURE_DIR/ipa_init.json
usage(){
echo "$0 {FIXTURE_DIR}"
exit 1
}
if [ ! -f $INIT_FILE ]
then
usage
exit 1
fi
json="{
\"method\": \"batch\",
\"params\": [
[
{
\"method\": \"i18n_messages\",
\"params\": [[], {}]
},
{
\"method\": \"user_find\",
\"params\":[[], { \"whoami\": true, \"all\": true }]
},
{
\"method\": \"env\",
\"params\": [[], {}]
},
{
\"method\": \"dns_is_enabled\",
\"params\": [[], {}]
}
],
{}
]
}"
curl -v\
-H "Content-Type: application/json"\
-H "Accept: applicaton/json"\
--negotiate\
--delegation always\
-u :\
--cacert /etc/ipa/ca.crt\
-d "$json"\
-X POST\
https://`hostname`/ipa/json | sed 's/[ \t]*$//' > $INIT_FILE