File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,20 @@ motd_ssh
2424customize
2525
2626msg_info " Creating Service"
27- PASSWORD=$( omd create monitoring | grep " password:" | awk ' {print $NF}' )
28- $STD omd start
27+ SITE_NAME=" monitoring"
28+ $STD omd create " $SITE_NAME "
29+ MKPASSWORD=$( openssl rand -base64 18 | tr -d ' /+=' | cut -c1-16)
30+
31+ echo -e " $MKPASSWORD \n$MKPASSWORD " | su - " $SITE_NAME " -c " cmk-passwd cmkadmin --stdin"
32+ $STD omd start " $SITE_NAME "
33+
2934{
30- echo " Application-Credentials"
31- echo " Username: cmkadmin"
32- echo " Password: $PASSWORD "
35+ echo " Application-Credentials"
36+ echo " Username: cmkadmin"
37+ echo " Password: $MKPASSWORD "
38+ echo " Site: $SITE_NAME "
3339} >> ~/checkmk.creds
40+
3441msg_ok " Created Service"
3542
3643msg_info " Cleaning up"
You can’t perform that action at this time.
0 commit comments