#!/bin/bash
#
#********************************************************************
#Author: lijinhua
#QQ: 157528088
#Date: 2023-6-6
#FileName: N77_SecondWeek_Work.sh
#URL:
#Description: This is a job script
#Copyright (C): 2023 All rights reserved
#********************************************************************
IPAddress () {
ifconfig eth0|grep -w "inet"|awk -F" " '{print $2}' ;
}
branch () {
if
IPAddress|grep '3' ;
then echo `clock`
else for i in {00..100};
do
useradd -g magedu_$i magedu
done
fi
}
PrintUsers () {
cat -n /etc/passwd|grep -v /sbin/nologin ;
}
YumNginx () {
yum -y install nginx ;
systemctl start nginx ;
ss -ntul ;
}
IPAddress
branch
PrintUsers
YumNginx