diff --git a/README.md b/README.md index c128a90..0f3ea00 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/Stats32 b/Stats32 index 08c8d57..6c4ed09 100755 --- a/Stats32 +++ b/Stats32 @@ -1,8 +1,9 @@ -#!/bin/sh +#!/usr/bin/env bash + # # Stats32 script generate some system infos for the motd file. # Date: 08/2017 -# +# # _______ __ __ ______ ______ # | __| |_.---.-.| |_.-----.|__ |__ | # |__ | _| _ || _|__ --||__ | __| diff --git a/bin/motds32 b/bin/motds32 index 0f494eb..a39fb68 100755 --- a/bin/motds32 +++ b/bin/motds32 @@ -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 # @@ -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 } # diff --git a/install.sh b/install.sh index d5a7237..7335ded 100755 --- a/install.sh +++ b/install.sh @@ -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)"