#!/bin/bash

# shellcheck disable=SC2034

#region JSON
CONF_LIST_CONFIG_JSON=$(cat <<EOF
[
  {
    "section": "SYSTEM",
    "items": [
      {"label": "SSH Config", "cmd": "/etc/ssh/sshd_config"},
      {"label": "Env vars", "cmd": "/etc/environment"}
    ]
  },
  {
    "section": "NETWORK",
    "items": [
      {"label": "Computer name", "cmd": "/etc/hosts"},
      {"label": "Computer name", "cmd": "/etc/hostname"}

    ]
  },
  {
    "section": "CERTIFICATS",
    "items": [
      {"label": "SSL Certificat", "cmd": "/etc/ssl/wildcard"},
      {"label": "Client cert list", "cmd": "/usr/local/share/ca-certificates"},
      {"label": "Public root cert", "cmd": "/var/lib/step-ca/.step/certs/root_ca.crt", "bin": "step-ca"},
      {"label": "ULTRA SECRET root cert", "cmd": "/var/lib/step-ca/.step/secrets/root_ca_key", "bin": "step-ca"},
      {"label": "ULTRA SECRET root cert password", "cmd": "/var/lib/step-ca/.step/password.txt", "bin": "step-ca"},
      {"label": "Step-ca configuration file", "cmd": "/var/lib/step-ca/.step/config/ca.json", "bin": "step-ca"}
    ]
  },
  {
    "section": "MAIL",
    "items": [
      {"label": "msmtp config", "cmd": "/etc/msmtprc", "bin": "msmtp"}
    ]
  },
  {
    "section": "Zabbix server",
    "items": [
      {"label": "Configuration", "cmd": "/etc/zabbix/zabbix_server.conf", "bin": "zabbix_server"},
      {"label": "Scripts custom", "cmd": "/usr/lib/zabbix/externalscripts", "bin": "zabbix_server"}
    ]
  },
  {
    "section": "Gitea Server",
    "items": [
      {"label": "Gitea config", "cmd": "/etc/gitea/app.ini", "bin": "gitea"}
    ]
  },
  {
    "section": "Zabbix Client",
    "items": [
      {"label": "Zabbix agent 2 config", "cmd": "/etc/zabbix/zabbix_agent2.conf", "bin": "zabbix_agent2"},
      {"label": "Zabbix agent config", "cmd": "/etc/zabbix/zabbix_agentd.conf", "bin": "zabbix_agentd"}
    ]
  },
  {
    "section": "APACHE",
    "items": [
      {"label": "Websites folder", "cmd": "/var/www/", "bin": "apache2"},
      {"label": "Apache config", "cmd": "/etc/apache2/", "bin": "apache2"}
    ]
  },
  {
    "section": "PHP",
    "items": [
      {"label": "CLI config", "cmd": "/etc/php/*/cli/php.ini", "bin": "php"},
      {"label": "Apache config", "cmd": "/etc/php/*/apache2/php.ini", "bin": "php"}
    ]
  },
  {
    "section": "MYSQL",
    "items": [
      {"label": "Mysql config", "cmd": "/etc/mysql/my.cnf", "bin": "mysql"}
    ]
  },
  {
    "section": "CUSTOM",
    "items": [
      {"label": "Message", "cmd": "/etc/profile.d/777-welcome.sh"},
      {"label": "Message désactivé -x", "cmd": "/etc/update-motd.d/*"}
    ]
  }
]
EOF
)
#endregion
