evomaintenance: upstream release 23.10
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2631|3|2628|4|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/368//ansiblelint">Evolix » ansible-roles » unstable #368</a>
gitea/ansible-roles/pipeline/head This commit looks good
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|2631|3|2628|4|:+1:
Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/368//ansiblelint">Evolix » ansible-roles » unstable #368</a>
gitea/ansible-roles/pipeline/head This commit looks good
This commit is contained in:
parent
0f15484ada
commit
c673ed10c6
|
@ -49,6 +49,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
||||||
* elasticsearch: improve networking configuration
|
* elasticsearch: improve networking configuration
|
||||||
* evolinux-base: include files under `sshd_config.d`
|
* evolinux-base: include files under `sshd_config.d`
|
||||||
* evolinux-users: remove Stretch references in tasks that also apply to next Debian versions
|
* evolinux-users: remove Stretch references in tasks that also apply to next Debian versions
|
||||||
|
* evomaintenance: upstream release 23.10
|
||||||
* lxc-php: change LXC container in bookworm for php82
|
* lxc-php: change LXC container in bookworm for php82
|
||||||
* minifirewall: update nrpe script to check active configuration
|
* minifirewall: update nrpe script to check active configuration
|
||||||
* minifirewall: upstream release 23.07
|
* minifirewall: upstream release 23.07
|
||||||
|
|
|
@ -1,21 +1,16 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# EvoMaintenance script
|
VERSION="23.10"
|
||||||
# Dependencies (all OS): git postgresql-client
|
|
||||||
# Dependencies (Debian): sudo
|
|
||||||
|
|
||||||
# Copyright 2007-2022 Evolix <info@evolix.fr>, Gregory Colpart <reg@evolix.fr>,
|
|
||||||
# Jérémy Lecour <jlecour@evolix.fr> and others.
|
|
||||||
|
|
||||||
VERSION="22.07"
|
|
||||||
|
|
||||||
show_version() {
|
show_version() {
|
||||||
cat <<END
|
cat <<END
|
||||||
evomaintenance version ${VERSION}
|
evomaintenance version ${VERSION}
|
||||||
|
|
||||||
Copyright 2007-2022 Evolix <info@evolix.fr>,
|
Copyright 2007-2023 Evolix <info@evolix.fr>,
|
||||||
Gregory Colpart <reg@evolix.fr>,
|
Gregory Colpart <reg@evolix.fr>,
|
||||||
Jérémy Lecour <jlecour@evolix.fr>
|
Jérémy Lecour <jlecour@evolix.fr>,
|
||||||
|
Brice Waegeneire <bwaegeneire@evolix.fr>,
|
||||||
|
Mathieu Trossevin <mtrossevin@evolix.fr>
|
||||||
and others.
|
and others.
|
||||||
|
|
||||||
evomaintenance comes with ABSOLUTELY NO WARRANTY. This is free software,
|
evomaintenance comes with ABSOLUTELY NO WARRANTY. This is free software,
|
||||||
|
@ -47,11 +42,11 @@ Options
|
||||||
--no-evocheck disable evocheck execution
|
--no-evocheck disable evocheck execution
|
||||||
--auto use "auto" mode
|
--auto use "auto" mode
|
||||||
--no-auto use "manual" mode (default)
|
--no-auto use "manual" mode (default)
|
||||||
--autosysadmin author change as autosysadmin
|
-u, --user=USER force USER value (default: logname(1))
|
||||||
-v, --verbose increase verbosity
|
-v, --verbose increase verbosity
|
||||||
-n, --dry-run actions are not executed
|
-n, --dry-run actions are not executed
|
||||||
--help print this message and exit
|
--help print this message and exit
|
||||||
--version print version and exit
|
-V, --version print version and exit
|
||||||
END
|
END
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +104,7 @@ get_begin_date() {
|
||||||
|
|
||||||
get_ip() {
|
get_ip() {
|
||||||
ip=$(get_who | cut -d" " -f6 | sed -e "s/^(// ; s/)$//")
|
ip=$(get_who | cut -d" " -f6 | sed -e "s/^(// ; s/)$//")
|
||||||
if is_autosysadmin || [ "${ip}" = ":0" ]; then
|
if is_autosysadmin || [ "${ip}" = ":0" ]; then
|
||||||
ip="localhost"
|
ip="localhost"
|
||||||
elif [ -z "${ip}" ]; then
|
elif [ -z "${ip}" ]; then
|
||||||
ip="unknown (no tty)"
|
ip="unknown (no tty)"
|
||||||
|
@ -127,8 +122,8 @@ get_now() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_user() {
|
get_user() {
|
||||||
if is_autosysadmin; then
|
if [ -n "${USER}" ]; then
|
||||||
echo autosysadmin
|
echo "${USER}"
|
||||||
else
|
else
|
||||||
logname
|
logname
|
||||||
fi
|
fi
|
||||||
|
@ -193,7 +188,7 @@ print_session_data() {
|
||||||
}
|
}
|
||||||
|
|
||||||
is_autosysadmin() {
|
is_autosysadmin() {
|
||||||
test "${AUTOSYSADMIN}" -eq 1
|
test "${USER}" = "autosysadmin"
|
||||||
}
|
}
|
||||||
|
|
||||||
is_repository_readonly() {
|
is_repository_readonly() {
|
||||||
|
@ -404,7 +399,7 @@ AUTO=${AUTO:-"0"}
|
||||||
EVOCHECK=${EVOCHECK:-"0"}
|
EVOCHECK=${EVOCHECK:-"0"}
|
||||||
GIT_STATUS_MAX_LINES=${GIT_STATUS_MAX_LINES:-20}
|
GIT_STATUS_MAX_LINES=${GIT_STATUS_MAX_LINES:-20}
|
||||||
API_ENDPOINT=${API_ENDPOINT:-""}
|
API_ENDPOINT=${API_ENDPOINT:-""}
|
||||||
AUTOSYSADMIN=${AUTOSYSADMIN:-0}
|
USER=${USER:-""}
|
||||||
|
|
||||||
# initialize variables
|
# initialize variables
|
||||||
MESSAGE=""
|
MESSAGE=""
|
||||||
|
@ -482,6 +477,31 @@ while :; do
|
||||||
# use "auto" mode
|
# use "auto" mode
|
||||||
AUTO=1
|
AUTO=1
|
||||||
;;
|
;;
|
||||||
|
--autosysadmin)
|
||||||
|
# Deprecated, backward compatibility
|
||||||
|
# author change as autosysadmin
|
||||||
|
printf 'WARNING: "--autosysadmin" is deprecated, use "--user autosysadmin".\n' >&2
|
||||||
|
USER="autosysadmin"
|
||||||
|
;;
|
||||||
|
-u|--user)
|
||||||
|
# user options, with value speparated by space
|
||||||
|
if [ -n "$2" ]; then
|
||||||
|
USER=$2
|
||||||
|
shift
|
||||||
|
else
|
||||||
|
printf 'ERROR: "--user" requires a non-empty option argument.\n' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
--user=?*)
|
||||||
|
# message options, with value speparated by =
|
||||||
|
USER=${1#*=}
|
||||||
|
;;
|
||||||
|
--user=)
|
||||||
|
# message options, without value
|
||||||
|
printf 'ERROR: "--user" requires a non-empty option argument.\n' >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
-n|--dry-run)
|
-n|--dry-run)
|
||||||
# disable actual commands
|
# disable actual commands
|
||||||
DRY_RUN=1
|
DRY_RUN=1
|
||||||
|
|
Loading…
Reference in a new issue