headers and cosmetics
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Error management functions
|
||||
# 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.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Some display functions and defines color codes
|
||||
# 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.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Package manager integration
|
||||
# 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.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Services manipulation functions
|
||||
# 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.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Base support function
|
||||
# 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.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# ------------------------------------------------------------------------------
|
||||
# Base functions
|
||||
# Main program functions
|
||||
# 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.
|
||||
|
||||
@@ -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
|
||||
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
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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 ]] &&
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
|
||||
# information on enabling SSL in the smtp client.
|
||||
|
||||
#smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
|
||||
myhostname = @HOSTNAME@.geoffray-levasseur.org
|
||||
myhostname = @HOSTNAME@.@MAINDOM@
|
||||
alias_maps = hash:/etc/aliases
|
||||
alias_database = hash:/etc/aliases
|
||||
myorigin = /etc/mailname
|
||||
|
||||
Reference in New Issue
Block a user