Linux_frogg-profile.d/config/config_cmd.sh

54 lines
1.3 KiB
Bash

#!/bin/bash
# shellcheck disable=SC2034
#region JSON
CMD_LIST_CONFIG_JSON=$(cat <<EOF
[
{
"section": "APACHE",
"items": [
{"label": "Restart apache", "cmd": "apache2ctl restart", "bin": "apache2ctl"},
{"label": "Status", "cmd": "service apache2 status", "bin": "apache2"}
]
},
{
"section": "SYSTEM",
"items": [
{"label": "Edit main cron", "cmd": "crontab -e", "bin": "crontab"},
{"label": "Restart service", "cmd": "/etc/init.d/\${name} restart"},
{"label": "Display journal", "cmd": "journalctl -xe", "bin": "journalctl"},
{"label": "Reload .bashrc", "cmd": "source ~/.bashrc"}
]
},
{
"section": "SECURITY",
"items": [
{"label": "Firewall rules", "cmd": "ufw status verbose", "bin": "ufw"}
]
},
{
"section": "TOOLS",
"items": [
{"label": "Disk space", "cmd": "ncdu", "bin": "ncdu"},
{"label": "Network stats", "cmd": "htop", "bin": "htop"}
]
},
{
"section": "UTILS",
"items": [
{"label": "Display loaded functions", "cmd": "declare -F"}
]
},
{
"section": "SYSTEM DEBUG",
"items": [
{"label": "Exec errors", "cmd": "journalctl -xe -p err"},
{"label": "Boot errors", "cmd": "journalctl -b -p err"},
{"label": "Service errors", "cmd": "systemctl --failed --no-legend --no-pager"}
]
}
]
EOF
)
#endregion