checkmk: change password crawling based on there docs (#6001)
* checkmk: change variable name for reserved PASSWORD * Update checkmk-install.sh * Update checkmk-install.sh * Update checkmk-install.sh
This commit is contained in:
parent
3a2f0bf2cc
commit
b16fa8d34f
@ -24,13 +24,20 @@ motd_ssh
|
|||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
PASSWORD=$(omd create monitoring | grep "password:" | awk '{print $NF}')
|
SITE_NAME="monitoring"
|
||||||
$STD omd start
|
$STD omd create "$SITE_NAME"
|
||||||
|
MKPASSWORD=$(openssl rand -base64 18 | tr -d '/+=' | cut -c1-16)
|
||||||
|
|
||||||
|
echo -e "$MKPASSWORD\n$MKPASSWORD" | su - "$SITE_NAME" -c "cmk-passwd cmkadmin --stdin"
|
||||||
|
$STD omd start "$SITE_NAME"
|
||||||
|
|
||||||
{
|
{
|
||||||
echo "Application-Credentials"
|
echo "Application-Credentials"
|
||||||
echo "Username: cmkadmin"
|
echo "Username: cmkadmin"
|
||||||
echo "Password: $PASSWORD"
|
echo "Password: $MKPASSWORD"
|
||||||
|
echo "Site: $SITE_NAME"
|
||||||
} >>~/checkmk.creds
|
} >>~/checkmk.creds
|
||||||
|
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user