headers and cosmetics

This commit is contained in:
levasseur
2021-09-08 15:47:39 +02:00
parent 2a4e238264
commit cba7107878
20 changed files with 38 additions and 11 deletions

View File

@@ -1,5 +1,6 @@
# ------------------------------------------------------------------------------
# Add local or remote users
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.
@@ -44,11 +45,11 @@ authnz()
/etc/pam.d
scv_restart nscd
fi
for usr in $REMOTE_USERS; do
add_remote_user $usr
done
for usr in $REMOTE_USERS; do
add_remote_user $usr
done
fi
for usr in $LOCAL_USERS; do
prnt I "Création de l'utilisateur $usr..."
@@ -68,10 +69,11 @@ precheck_authnz()
else
if [[ -n $REMOTE_USERS ]]; then
prnt E "Impossible d'ajouter des utilisateurs distants sans les méchanismes d'authentication."
die 109
fi
fi
if [[ -n $LOCAL_USERS ]]; then
prnt I "Les utilisateurs locaux suivants seront créés :"
prnt m "\t$LOCAL_USERS"
prnt m "\t* $LOCAL_USERS"
fi
}

View File

@@ -1,5 +1,6 @@
# ------------------------------------------------------------------------------
# Secondary drive configuration
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.

View File

@@ -1,5 +1,6 @@
# ------------------------------------------------------------------------------
# Mail system
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.
@@ -20,7 +21,8 @@ conf_mail()
prnt I "Configuration de postfix..."
installfile postfix_main.cf /etc/postfix/main.cf
sed -i -e "s/@HOSTNAME@/$HOSTNAME/g" /etc/postfix/main.cf
sed -i -e "s/@HOSTNAME@/$HOSTNAME/" -e "s/@MAINDOM@/$MAINDOM/" \
/etc/postfix/main.cf
echo $HOSTNAME.$MAINDOM > /etc/mailname
svc_restart postfix
}

View File

@@ -1,5 +1,6 @@
# ------------------------------------------------------------------------------
# Configure NTP
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.

View File

@@ -1,5 +1,6 @@
# ------------------------------------------------------------------------------
# Configure SSH client and server
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.

View File

@@ -1,5 +1,6 @@
# ------------------------------------------------------------------------------
# Configure Rsyslog
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.

View File

@@ -1,5 +1,6 @@
# ------------------------------------------------------------------------------
# Create VBox VM
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.

View File

@@ -2,6 +2,7 @@
# Since Ubuntu install snapd version of Chromium and we don't want that
# we need a special procedure to install Debian Buster version.
# Consequently that module is *Ubuntu centric.
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.

View File

@@ -1,6 +1,7 @@
# ------------------------------------------------------------------------------
# Install desktop environment -- Ubuntu only
# Debian version might ask for task-$FLAVOR
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.

View File

@@ -1,5 +1,6 @@
# ------------------------------------------------------------------------------
# Install check_mk agent using xinetd superserver
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.
@@ -24,6 +25,10 @@ install_mkagent()
precheck_install_mkagent()
{
[[ -n $MKVERSION ]] && (
prnt E "Undeclared check_mk version of the agent to install."
die 162
)
[[ -n $MK_SERVER ]] && (
prnt E "Undeclared check_mk server."
die 162

View File

@@ -1,5 +1,6 @@
# ------------------------------------------------------------------------------
# Install or remove packages
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.

View File

@@ -1,5 +1,6 @@
# ------------------------------------------------------------------------------
# SNMP monitoring conf
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.
@@ -11,8 +12,8 @@ export VER_patch_snmp="0.0.1"
patch_snmp()
{
backupdist /etc/snmp/snmpd.conf /etc/default/snmpd /lib/systemd/system/snmpd.service \
/etc/init.d/snmpd
backupdist /etc/snmp/snmpd.conf /etc/default/snmpd \
/lib/systemd/system/snmpd.service /etc/init.d/snmpd
installfile snmpd.conf /etc/snmp/snmpd.conf
installfile snmpd.init /etc/init.d/snmpd
[[ -e /lib/systemd/system/snmpd.service ]] &&

View File

@@ -1,6 +1,7 @@
# ------------------------------------------------------------------------------
# Distribution upgrade module, should be ran prior any other module (also
# configure APT)
# This file is part of the init.sh project
# Copyright (c) 2019-2021 Geoffray Levasseur <fatalerrors@geoffray-levasseur.org>
# ------------------------------------------------------------------------------
# This file is distributed under 3-clause BSD license.
@@ -21,7 +22,7 @@ upgrade_dist()
prnt I "Configuration du proxy pour APT..."
if [[ $PROXYAPT ]]; then
if [[ ! -d $(basedir $proxyfile) ]]; then
mkdir -pv /etc/apt/apt.conf.d || (
mkdir -pv $(basedir $proxyfile) || (
prnt E "Impossiblle de créer le répertoire d'accueil pour la configuration d'APT."
die 60
)
@@ -35,8 +36,10 @@ upgrade_dist()
prnt I "Mise à jour de la liste des paquets..."
pkgupdt
prnt I "Application des mises à jour de paquets..."
pkgupdg
prnt I "Suppression des paquets résiduels..."
pkgautorem
}