39 lines
522 B
Bash
39 lines
522 B
Bash
#!/bin/sh
|
|
|
|
echo "Munin-bitcoin starting..."
|
|
|
|
mkdir -p /tmp/munin-web
|
|
|
|
cat > /tmp/munin-web/index.html <<EOF
|
|
<html>
|
|
<body>
|
|
<h1>Munin-bitcoin</h1>
|
|
<p>Service is running.</p>
|
|
</body>
|
|
</html>
|
|
EOF
|
|
|
|
cat > /tmp/nginx.conf <<EOF
|
|
events {}
|
|
|
|
http {
|
|
server {
|
|
listen 80;
|
|
root /tmp/munin-web;
|
|
|
|
location / {
|
|
index index.html;
|
|
}
|
|
}
|
|
}
|
|
EOF
|
|
|
|
echo "Starting web interface..."
|
|
|
|
nginx -g "daemon off;" -c /tmp/nginx.conf &
|
|
|
|
while true
|
|
do
|
|
echo "Munin-bitcoin is running"
|
|
sleep 300
|
|
done |