Update adm.sh
reloaded script
This commit is contained in:
parent
04228bea32
commit
32597eaf97
6
adm.sh
6
adm.sh
@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
pcname=""
|
||||
onContinue=true
|
||||
while $onContinue; do
|
||||
while [ "$onContinue" = "true" ]; do
|
||||
read -p "Введите номер пк: A-PC-KC-" pcname
|
||||
pcname="A-PC-KC-$pcname"
|
||||
if [[ $pcname =~ ^A-PC-KC-[0-9]{2}$ ]]; then
|
||||
while true; do
|
||||
read -p "Имя ПК $pcname. Сохранить? [y/n]" ans
|
||||
read -p "Имя ПК $pcname. Сохранить? [y/n] " ans
|
||||
if [[ $ans =~ ^([Yy]es|[Yy]|[Дд]а|[Дд])$ ]]; then
|
||||
onContinue=false
|
||||
break
|
||||
@ -16,4 +16,4 @@ while $onContinue; do
|
||||
done
|
||||
fi
|
||||
done
|
||||
su -c "apt-get update && apt-get install task-auth-ad-sssd -y && system-auth write ad mtuci.adm $pcname MTUCI 'vvod' ':TcyMH@DEy4tE6xls4>S@GQJbM_SwX'"
|
||||
su -c "apt-get update && apt-get install task-auth-ad-sssd -y && system-auth write ad mtuci.adm $pcname MTUCI 'vvod' ':TcyMH@DEy4tE6xls4>S@GQJbM_SwX'" || exit 1
|
||||
Loading…
Reference in New Issue
Block a user