first commit

This commit is contained in:
Erreur32 2020-04-04 11:57:16 +02:00
parent 8c33c58e07
commit 4dabdd7cb9
4 changed files with 16 additions and 18 deletions

View File

@ -203,10 +203,8 @@ Explanation of the report
Stats Repo Stats Repo
---------- ----------
- https://echosystem.fr/MOTDs32 - https://l.echosystem.fr/MOTDs32stats
- https://echosystem.fr/MOTDs32/32.html
- https://echosystem.fr/MOTDs32/Stats/index.html
by 🅴🆁🆁🅴🆄🆁32 by 🅴🆁🆁🅴🆄🆁32

View File

@ -1,8 +1,9 @@
#!/bin/sh #!/usr/bin/env bash
# #
# Stats32 script generate some system infos for the motd file. # Stats32 script generate some system infos for the motd file.
# Date: 08/2017 # Date: 08/2017
# #
# _______ __ __ ______ ______ # _______ __ __ ______ ______
# | __| |_.---.-.| |_.-----.|__ |__ | # | __| |_.---.-.| |_.-----.|__ |__ |
# |__ | _| _ || _|__ --||__ | __| # |__ | _| _ || _|__ --||__ | __|

View File

@ -1,11 +1,11 @@
#!/bin/bash #!/usr/bin/env bash
# #
# MOTDs32 powered by Erreur32 # MOTDs32 powered by Erreur32
# Original Author: Krigler Pavol # Original Author: Krigler Pavol
# Version 0.0.5 # Version 0.0.5
# #
# MOTDs32 is dynamicaly refreshing the /etc/motd file with current informations # MOTDs32 is dynamicaly refreshing the /etc/motd file with current informations
# about system status and usage. # about system status and usage.
# #
# Copyright 2013 Pavol Krigler <pavol.krigler@gelogic.net> # Copyright 2013 Pavol Krigler <pavol.krigler@gelogic.net>
# #
@ -24,7 +24,7 @@ CONFIGFILE="/etc/motds32/motds32.conf"
MOTD='/etc/motd' MOTD='/etc/motd'
MOTD32="/etc/motds32/Stats32" MOTD32="/etc/motds32/Stats32"
PRG32="/etc/motds32" PRG32="/etc/motds32"
# List of network services which MUST be running # List of network services which MUST be running
NETSERVICE_LIST="/etc/motds32/netservice" NETSERVICE_LIST="/etc/motds32/netservice"
# List of processes which MUST be running # List of processes which MUST be running
@ -53,7 +53,7 @@ COLL_PROC="$TMPDIR/.motds32_proc_$$"
COLL_WALL="$TMPDIR/.motdstat_wall_$$" COLL_WALL="$TMPDIR/.motdstat_wall_$$"
COLL_EMPTY="$TMPDIR/.motds32_empty_$$" COLL_EMPTY="$TMPDIR/.motds32_empty_$$"
# Set default VARIABLES # Set default VARIABLES
function set_default_values() { function set_default_values() {
DISK_USAGE_WARNING=80 DISK_USAGE_WARNING=80
DISK_USAGE_CRITICAL=90 DISK_USAGE_CRITICAL=90
@ -96,7 +96,7 @@ $MOTD32 > $PRG32/Stats32.txt
# #
function report() { function report() {
REPORT=$REPORT"${1}\n" REPORT=$REPORT"${1}\n"
test $ENABLE_SYSLOG = "YES" && logger -t motds32 -- "${1}" test $ENABLE_SYSLOG = "YES" && logger -t motds32 -- "${1}"
} }
# #
@ -149,7 +149,7 @@ function gen_process_list() {
pgrep -x ${PROCESS} > /dev/null pgrep -x ${PROCESS} > /dev/null
PGREP=$? PGREP=$?
test ${PGREP} -eq 0 && echo ${PROCESS} >> ${PROCESS_LIST} test ${PGREP} -eq 0 && echo ${PROCESS} >> ${PROCESS_LIST}
done done
} }
# #

View File

@ -1,4 +1,4 @@
#!/bin/sh #!/usr/bin/env bash
# #
# MOTDs32 installation instructions # MOTDs32 installation instructions
# ================================== # ==================================
@ -35,13 +35,12 @@
# #
################################################################################ ################################################################################
# Make sure only root can run our script # Make sure only root can run our script
#if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
# echo "This script must be run as root" 1>&2 echo "This script must be run as root" 1>&2
# exit 1 exit 1
#fi fi
## clean terminal ## clean terminal
#clear;
BG_BLUE="$(tput setab 4)" BG_BLUE="$(tput setab 4)"
BG_BLACK="$(tput setab 0)" BG_BLACK="$(tput setab 0)"
FG_GREEN="$(tput setaf 2)" FG_GREEN="$(tput setaf 2)"