1
0
mirror of https://github.com/AG7GN/nexus-utilities.git synced 2025-05-18 15:30:12 -07:00

Reset desktop text and shell history

This commit is contained in:
Steve Magnuson 2020-02-16 15:23:35 -08:00
parent 70a91a88d6
commit 6a1463a723
2 changed files with 27 additions and 5 deletions

View File

@ -1 +1 @@
VERSION="2.1.3" VERSION="2.1.4"

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
VERSION="1.15.3" VERSION="1.16.6"
# #
# Script to generate new VNC server and SSH server keys at boot time if a certain # Script to generate new VNC server and SSH server keys at boot time if a certain
@ -51,9 +51,6 @@ rm -f $DIR/.ssh/*~
rm -f $DIR/*~ rm -f $DIR/*~
# Clear Terminal history
history -c
echo "Remove Fldigi suite logs and messages and personalized data" >> "$INIT_DONE_FILE" echo "Remove Fldigi suite logs and messages and personalized data" >> "$INIT_DONE_FILE"
DIRS=".nbems .nbems-left .nbems-right" DIRS=".nbems .nbems-left .nbems-right"
for D in $DIRS for D in $DIRS
@ -187,6 +184,31 @@ do
sudo sed -e "s/_LEFT_RADIO_/Left Radio/" -e "s/_RIGHT_RADIO_/Right Radio/g" $F > ${F%.*}.desktop sudo sed -e "s/_LEFT_RADIO_/Left Radio/" -e "s/_RIGHT_RADIO_/Right Radio/g" $F > ${F%.*}.desktop
done done
# Reset pat configuration
if [ -f $HOME/.wl2k/config.json ]
then
sed -i -e 's/"mycall": .*",$/"mycall": "",/' \
-e 's/"secure_login_password": .*",$/"secure_login_password": "",/' \
-e 's/"locator": .*",$/"locator": "",/' $HOME/.wl2k/config.json
rm -f $HOME/.wl2k/config.json~
echo "Delete pat configuration" >> "$INIT_DONE_FILE"
fi
# Reset Desktop image
if [ -f $HOME/.config/pcmanfm/LXDE-pi/desktop-items-0.conf ]
then
rm -f $HOME/desktop-text.conf
rm -f $HOME/Pictures/TEXT_*.jpg
if [ -f $HOME/Pictures/NexusDeskTop.jpg ]
then
sed -i -e "s|^wallpaper=.*|wallpaper=$HOME/Pictures/NexusDeskTop.jpg|" $HOME/.config/pcmanfm/LXDE-pi/desktop-items-0.conf
fi
fi
# Clear Terminal history
echo "" > $HOME/.bash_history && history -c
echo "Delete shell history" >> "$INIT_DONE_FILE"
# Expand the filesystem if it is < 8 GB # Expand the filesystem if it is < 8 GB
echo "Expand filesystem if needed" >> "$INIT_DONE_FILE" echo "Expand filesystem if needed" >> "$INIT_DONE_FILE"
PARTSIZE=$( df | sed -n '/root/{s/ */ /gp}' | cut -d ' ' -f2 ) PARTSIZE=$( df | sed -n '/root/{s/ */ /gp}' | cut -d ' ' -f2 )