Skip to content

Instantly share code, notes, and snippets.

@ephdtrg
Created October 14, 2018 17:00
Show Gist options
  • Save ephdtrg/47b3591c4bb04a9f115e54c2fc309507 to your computer and use it in GitHub Desktop.
Save ephdtrg/47b3591c4bb04a9f115e54c2fc309507 to your computer and use it in GitHub Desktop.
#!/bin/sh
print_info()
{
echo "### Status"
echo "\`\`\`"
systemctl status --no-pager "snap.nextcloud.$1.service"
echo "\`\`\`"
echo "### Journal"
echo "\`\`\`"
journalctl --no-pager -n100 -u "snap.nextcloud.$1.service"
echo "\`\`\`"
}
start_section()
{
echo "<details>"
echo " <summary>$1</summary>"
echo " <p>"
echo ""
}
end_section()
{
echo " </p>"
echo "</details>"
echo ""
}
start_section "Apache"
print_info "apache"
end_section
start_section "PHP"
print_info "php-fpm"
end_section
start_section "MySQL"
print_info "mysql"
end_section
start_section "Redis"
print_info "redis-server"
end_section
start_section "mDNS Publisher"
print_info "mdns-publisher"
end_section
start_section "Certificate Renewer"
print_info "renew-certs"
end_section
start_section "Nextcloud Cron"
print_info "nextcloud-cron"
end_section
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment