Merge branch 'master' of ssh://pi2/vincent/conf2
This commit is contained in:
commit
5ea27f879a
23
script/script/check_service.sh
Executable file
23
script/script/check_service.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
SERVICES=("mariadb" "nginx" "php-fpm" "gitea" "tt-rss" "named" "autofs" "rsyncd.socket")
|
||||||
|
HOST=$(hostname)
|
||||||
|
RED='\033[0;31m'
|
||||||
|
GREEN='\033[0;32m'
|
||||||
|
NC='\033[0m'
|
||||||
|
|
||||||
|
#attend 60s pour que les autre service est le temps de démarrer
|
||||||
|
sleep 60
|
||||||
|
|
||||||
|
echo "device $HOST have reboot curent status of critic service:"
|
||||||
|
for service in ${SERVICES[@]}
|
||||||
|
do
|
||||||
|
status=$(systemctl is-active $service)
|
||||||
|
|
||||||
|
if [ $status = "inactive" ]
|
||||||
|
then
|
||||||
|
echo -e "$service is $status"
|
||||||
|
echo $(journalctl -u $service --lines=10 -q)
|
||||||
|
else
|
||||||
|
echo -e "$service is $status"
|
||||||
|
fi
|
||||||
|
echo ""
|
||||||
|
done
|
@ -25,8 +25,8 @@ alias diskstation-root='ssh root@diskstation -p 1020'
|
|||||||
|
|
||||||
#set command alias
|
#set command alias
|
||||||
alias nano='nano -c'
|
alias nano='nano -c'
|
||||||
alias rarret='sudo systemctl poweroff'
|
alias rarret='sudo systemctl poweroff --no-wall'
|
||||||
alias arret='systemctl poweroff'
|
alias arret='systemctl poweroff --no-wall'
|
||||||
alias du='du -h'
|
alias du='du -h'
|
||||||
alias df='df -h'
|
alias df='df -h'
|
||||||
alias rr='rm -r'
|
alias rr='rm -r'
|
||||||
|
Loading…
Reference in New Issue
Block a user