1
0
mirror of https://github.com/AG7GN/nexus-utilities.git synced 2025-05-28 04:10:19 -07:00

Update initialize script

This commit is contained in:
Steve Magnuson 2020-12-08 12:06:17 -08:00
parent ba06d992ee
commit 001761fe95
2 changed files with 18 additions and 11 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
VERSION="1.17.4"
VERSION="1.17.5"
#
# Script to generate new VNC server and SSH server keys at boot time if a certain
@ -49,7 +49,20 @@ rm -f $DIR/.ssh/authorized_keys
rm -f $DIR/.ssh/id_*
rm -f $DIR/.ssh/*~
echo "Clean home folder" >> "$INIT_DONE_FILE"
rm -f $DIR/*~
rm -rf $DIR/.putty
rm -rf $DIR/.thumbnails
rm -rf $DIR/.cache
rm -rf $DIR/Documents/*
rm -rf $DIR/Downloads/*
rm -rf $DIR/Music/*
rm -rf $DIR/Public/*
rm -rf $DIR/Templates/*
rm -rf $DIR/Videos/*
rm -rf $HOME/.wl2k
rm -rf $HOME/.wl2kgw
echo "Remove Fldigi suite logs and messages and personalized data" >> "$INIT_DONE_FILE"
DIRS=".nbems .nbems-left .nbems-right"
@ -78,7 +91,7 @@ do
rm -f $DIR/$D/ARQ/mail/sent/*
if [ -f $DIR/$D/FLMSG.prefs ]
then
sed -i -e 's/^mycall:.*/mycall:N0ONE/' \
sed -i -e 's/^mycall:.*/mycall:/' \
-e 's/^mytel:.*/mytel:/' \
-e 's/^myname:.*/myname:/' \
-e 's/^myaddr:.*/myaddr:/' \
@ -109,7 +122,7 @@ do
rm -f $DIR/$D/wrap/*
if [ -f $DIR/$D/fldigi_def.xml ]
then
sed -i -e 's/<MYCALL>.*<\/MYCALL>/<MYCALL>N0ONE<\/MYCALL>/' \
sed -i -e 's/<MYCALL>.*<\/MYCALL>/<MYCALL><\/MYCALL>/' \
-e 's/<MYQTH>.*<\/MYQTH>/<MYQTH><\/MYQTH>/' \
-e 's/<MYNAME>.*<\/MYNAME>/<MYNAME><\/MYNAME>/' \
-e 's/<MYLOC>.*<\/MYLOC>/<MYLOC><\/MYLOC>/' \
@ -206,13 +219,6 @@ do
[[ $F =~ example$ ]] || rm -f $F
done
# Remove Downloads content
rm -f $HOME/Downloads/*
# Reset pat configuration
rm -rf $HOME/.wl2k
rm -rf $HOME/.wl2kgw
# Reset Desktop image
if [ -f $HOME/.config/pcmanfm/LXDE-pi/desktop-items-0.conf ]
then

View File

@ -7,9 +7,10 @@ cp -f nexus-utilities/*.conf /usr/local/src/nexus/
cp -f nexus-utilities/*.html /usr/local/share/nexus
cp -f nexus-utilities/*.jpg $HOME/Pictures/
cp -f nexus-utilities/*.example $HOME/
sudo cp -f nexus-utilities/check-piano.sh /usr/local/sbin/
sudo cp -f nexus-utilities/initialize-pi.sh /usr/local/sbin/
sudo cp -f nexus-utilities/*.sh /usr/local/bin/
sudo cp -f nexus-utilities/shutdown_button.py /usr/local/sbin/
sudo cp -f nexus-utilities/check-piano.sh /usr/local/sbin/
sudo cp -f nexus-utilities/*.py /usr/local/bin/
sudo cp -f nexus-utilities/*.desktop /usr/local/share/applications/
sudo cp -f nexus-utilities/*.template /usr/local/share/applications/