add html/status.php
This commit is contained in:
parent
4d1af651d7
commit
2b977515e4
14
html/status.php
Normal file
14
html/status.php
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
if ($db_link = mysqli_connect('localhost', 'nagios', '', '')) {
|
||||
|
||||
mysqli_close($db_link);
|
||||
/* 200 OK */
|
||||
http_response_code(200);
|
||||
|
||||
} else {
|
||||
|
||||
/* 503 Service Unavailable */
|
||||
http_response_code(503);
|
||||
|
||||
}
|
|
@ -43,6 +43,7 @@ if [ ! -d "/etc/mysql/" ]; then
|
|||
chmod 600 /root/.my.cnf
|
||||
mysql -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$MARIADBPWORD');"
|
||||
sed -i "s|password = |password = $MARIADBPWORD|g" /etc/mysql/debian.cnf
|
||||
mysql -e "CREATE USER 'nagios'@'localhost' IDENTIFIED WITH mysql_native_password AS '';"
|
||||
mysqladmin flush-privileges
|
||||
|
||||
fi
|
||||
|
@ -103,6 +104,10 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
# install status.php
|
||||
cp html/status.php /srv/www/html
|
||||
chmod 644 /srv/www/html/status.php
|
||||
|
||||
# jailkit
|
||||
apt -y install jailkit
|
||||
# bugfix, fixed upstream, shouldn't be needed if jailkit package gets updated
|
||||
|
|
Loading…
Reference in New Issue
Block a user