2023-10-22 04:11:19 +05:00
|
|
|
#!/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 "./skel/$i" ]; then
|
|
|
|
echo "$i exist"
|
2024-01-20 17:14:33 +05:00
|
|
|
cp -vf /home/liveuser/$i ./skel/$i
|
2023-10-22 04:11:19 +05:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
chown -R 1000:1000 .
|
2023-10-29 00:48:06 +05:00
|
|
|
|
|
|
|
echo "Ready"
|