1749857917
This commit is contained in:
@@ -61,6 +61,22 @@ fi
|
|||||||
echo "Cleaning up..."
|
echo "Cleaning up..."
|
||||||
sudo apt autoremove -y # cleanup
|
sudo apt autoremove -y # cleanup
|
||||||
|
|
||||||
|
if [ ! -z $SUDO_USER ]; then
|
||||||
|
username=$SUDO_USER
|
||||||
|
else
|
||||||
|
username=$USER
|
||||||
|
fi
|
||||||
|
|
||||||
|
# handle users serial shit
|
||||||
|
## self
|
||||||
|
echo "Giving $username the right permissions..."
|
||||||
|
sudo usermod -aG dialout $username
|
||||||
|
## service users
|
||||||
|
echo "Giving service users the right permissions..."
|
||||||
|
sudo usermod -aG dialout gpsd
|
||||||
|
sudo usermod -aG dialout _chrony
|
||||||
|
|
||||||
|
|
||||||
echo "3 complete" > ./status.txt
|
echo "3 complete" > ./status.txt
|
||||||
|
|
||||||
echo "Part 3 done!"
|
echo "Part 3 done!"
|
||||||
|
|||||||
@@ -4,21 +4,6 @@ set -e
|
|||||||
echo "Updating this repo..."
|
echo "Updating this repo..."
|
||||||
git pull 1>/dev/null 2>/dev/null
|
git pull 1>/dev/null 2>/dev/null
|
||||||
|
|
||||||
if [ ! -z $SUDO_USER ]; then
|
|
||||||
username=$SUDO_USER
|
|
||||||
else
|
|
||||||
username=$USER
|
|
||||||
fi
|
|
||||||
|
|
||||||
# handle users serial shit
|
|
||||||
## self
|
|
||||||
echo "Giving $username the right permissions..."
|
|
||||||
sudo usermod -aG dialout $username
|
|
||||||
## service users
|
|
||||||
echo "Giving service users the right permissions..."
|
|
||||||
sudo usermod -aG dialout gpsd
|
|
||||||
sudo usermod -aG dialout _chrony
|
|
||||||
|
|
||||||
# reconfigure to normal mode
|
# reconfigure to normal mode
|
||||||
echo "Starting configure script..."
|
echo "Starting configure script..."
|
||||||
# quiet level
|
# quiet level
|
||||||
|
|||||||
+1
-1
@@ -29,7 +29,7 @@ hwclockset_new="$1/hwclock-set"
|
|||||||
crontab_new="$1/root-crontab"
|
crontab_new="$1/root-crontab"
|
||||||
|
|
||||||
# stop da services
|
# stop da services
|
||||||
bash ./services.sh stop 1>/dev/null 2>/dev/null
|
bash ./services.sh stop
|
||||||
|
|
||||||
# backup conf
|
# backup conf
|
||||||
bash ./dump_configs.sh
|
bash ./dump_configs.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user