http-server-status/scripts/postinstall.sh

13 lines
343 B
Bash

if [ -f "/etc/http-server-status/config.yml" ]; then
echo "Config exists"
else
cp /etc/http-server-status/config.yml.sample /etc/http-server-status/config.yml
fi
systemctl daemon-reload
STATUS="$(systemctl is-active tomcat.service)"
if [ "${STATUS}" = "active" ]; then
systemctl restart http-server-status
echo "Restart Service"
fi