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
----------
- https://echosystem.fr/MOTDs32
- https://echosystem.fr/MOTDs32/32.html
- https://echosystem.fr/MOTDs32/Stats/index.html
- https://l.echosystem.fr/MOTDs32stats
by 🅴🆁🆁🅴🆄🆁32

View File

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

View File

@ -1,11 +1,11 @@
#!/bin/bash
#!/usr/bin/env bash
#
# MOTDs32 powered by Erreur32
# Original Author: Krigler Pavol
# Version 0.0.5
#
# 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>
#
@ -24,7 +24,7 @@ CONFIGFILE="/etc/motds32/motds32.conf"
MOTD='/etc/motd'
MOTD32="/etc/motds32/Stats32"
PRG32="/etc/motds32"
# List of network services which MUST be running
# List of network services which MUST be running
NETSERVICE_LIST="/etc/motds32/netservice"
# List of processes which MUST be running
@ -53,7 +53,7 @@ COLL_PROC="$TMPDIR/.motds32_proc_$$"
COLL_WALL="$TMPDIR/.motdstat_wall_$$"
COLL_EMPTY="$TMPDIR/.motds32_empty_$$"
# Set default VARIABLES
# Set default VARIABLES
function set_default_values() {
DISK_USAGE_WARNING=80
DISK_USAGE_CRITICAL=90
@ -96,7 +96,7 @@ $MOTD32 > $PRG32/Stats32.txt
#
function report() {
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=$?
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
# ==================================
@ -35,13 +35,12 @@
#
################################################################################
# Make sure only root can run our script
#if [[ $EUID -ne 0 ]]; then
# echo "This script must be run as root" 1>&2
# exit 1
#fi
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
## clean terminal
#clear;
BG_BLUE="$(tput setab 4)"
BG_BLACK="$(tput setab 0)"
FG_GREEN="$(tput setaf 2)"