22 lines
298 B
Bash
22 lines
298 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [[ "$UID" != 0 ]]; then
|
||
|
echo "USER NOT ROOT"
|
||
|
sudo $0
|
||
|
exit
|
||
|
else
|
||
|
echo "USER IS ROOT"
|
||
|
fi
|
||
|
|
||
|
l=$(cat liveuser.txt)
|
||
|
|
||
|
for i in $l
|
||
|
do
|
||
|
if [ -f "./liveuser/$i" ]; then
|
||
|
echo "$i exist"
|
||
|
cp -vf /home/liveuser/$i ./liveuser/$i
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
chown -R 1000:1000 .
|