- Ajout de la gestion de MOTD
This commit is contained in:
parent
9d746b4443
commit
5a82b866da
12
TODO.md
12
TODO.md
|
|
@ -4,22 +4,12 @@
|
|||
# GITEA
|
||||
- faire le redirect port 80
|
||||
- ajouter https sur gitea
|
||||
|
||||
# SERVER
|
||||
- mettre les scripts sur tous les linux
|
||||
|
||||
# ZABBIX
|
||||
- config Proxmox (dl le template)
|
||||
- config ndv
|
||||
- config gita
|
||||
|
||||
NETTOYER /ETC/MOTD
|
||||
/etc/update-motd.d/
|
||||
|
||||
# git
|
||||
> clone un depot si il y a deja des fichiers
|
||||
git init
|
||||
git remote add origin <url>
|
||||
git fetch
|
||||
git reset --hard origin/main
|
||||
git clean -fd
|
||||
|
||||
|
|
|
|||
|
|
@ -48,13 +48,14 @@ CONF_LIST_CONFIG_JSON=$(cat <<EOF
|
|||
{
|
||||
"section": "TOOLS",
|
||||
"items": [
|
||||
{"label": "Zabbix agent", "cmd": "/etc/zabbix/zabbix-agent.conf", "bin": "zabbix-agent"}
|
||||
{"label": "Zabbix agent", "cmd": "/etc/zabbix/zabbix_agentd.conf", "bin": "zabbix_agentd"}
|
||||
]
|
||||
},
|
||||
{
|
||||
"section": "CUSTOM",
|
||||
"items": [
|
||||
{"label": "Login message", "cmd": "/etc/profile.d/777-welcome.sh"}
|
||||
{"label": "Message", "cmd": "/etc/profile.d/777-welcome.sh"},
|
||||
{"label": "Message désactivé -x", "cmd": "/etc/update-motd.d/*"}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ CONFIG_DEB_INSTALL_JSON='[
|
|||
{"id": "ufw_pkg", "label": "Installer Firewall (UFW)", "type": "pkg", "params": "ufw"},
|
||||
{"id": "gen_ssh_key", "label": "Creer une clé RSA pour SSH", "type": "sys", "params": "gen_ssh_key"},
|
||||
{"id": "ipv6", "label": "Désactiver IPv6", "type": "sys", "params": "ipv6"},
|
||||
{"id": "motd", "label": "Désactiver les messages MOTD", "type": "sys", "params": "motd"},
|
||||
{"id": "mail", "label": "Configurer ADMIN_MAIL", "type": "sys", "params": "mail"},
|
||||
{"id": "hostname", "label": "Changer le Hostname", "type": "sys", "params": "hostname"},
|
||||
{"id": "static_ip", "label": "Configurer IP Statique (eth0)", "type": "sys", "params": "static_ip"},
|
||||
|
|
|
|||
|
|
@ -111,6 +111,14 @@ check_deb_sys_deploy_ssh_key(){
|
|||
return 0
|
||||
}
|
||||
|
||||
check_deb_sys_motd(){
|
||||
if find /etc/update-motd.d/ -type f -perm /111 | grep -q .; then
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
|
||||
check_deb_sys_clone_ssh_key(){
|
||||
if [[ -f "$RSA_KEY_FILE" ]]; then
|
||||
return 1
|
||||
|
|
@ -118,6 +126,11 @@ check_deb_sys_clone_ssh_key(){
|
|||
return 0
|
||||
}
|
||||
|
||||
do_deb_sys_motd(){
|
||||
$SUDO chmod -x /etc/update-motd.d/*
|
||||
msg_success "Les fichiers dans /etc/update-motd.d/ ne sont plus executable"
|
||||
msg_success "Ils ne seront donc plus lancé à la connexion"
|
||||
}
|
||||
|
||||
do_deb_sys_gen_ssh_key() {
|
||||
if [[ -f "$RSA_KEY_FILE" ]]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue