diff --git a/src/freedombone-image-mesh b/src/freedombone-image-mesh index 60916fe7..6da52176 100755 --- a/src/freedombone-image-mesh +++ b/src/freedombone-image-mesh @@ -480,7 +480,18 @@ function mesh_amnesic { echo '#!/bin/bash' > /usr/bin/amnesic echo '' >> /usr/bin/amnesic + echo 'MY_USERNAME=$1' >> /usr/bin/amnesic echo 'tomb slam all' >> /usr/bin/amnesic + echo "if [ -f /home/${MY_USERNAME}/.bash_history ]; then" >> /usr/bin/amnesic + echo " shred -zu /home/${MY_USERNAME}/.bash_history" >> /usr/bin/amnesic + echo 'fi' >> /usr/bin/amnesic + echo "if [ -f /home/${MY_USERNAME}/.ssh/authorized_keys ]; then" >> /usr/bin/amnesic + echo " shred -zu /home/${MY_USERNAME}/.ssh/authorized_keys" >> /usr/bin/amnesic + echo " echo '' > /home/${MY_USERNAME}/.ssh/authorized_keys" >> /usr/bin/amnesic + echo 'fi' >> /usr/bin/amnesic + echo "if [ -f /home/${MY_USERNAME}/.xsession-errors ]; then" >> /usr/bin/amnesic + echo " shred -zu /home/${MY_USERNAME}/.xsession-errors" >> /usr/bin/amnesic + echo 'fi' >> /usr/bin/amnesic echo '' >> /usr/bin/amnesic echo 'exit 0' >> /usr/bin/amnesic chmod +x /usr/bin/amnesic @@ -495,7 +506,7 @@ function mesh_amnesic { echo 'Type=oneshot' >> /etc/systemd/system/amnesic.service echo 'RemainAfterExit=true' >> /etc/systemd/system/amnesic.service echo 'ExecStart=/bin/true' >> /etc/systemd/system/amnesic.service - echo "ExecStop=/usr/bin/amnesic" >> /etc/systemd/system/amnesic.service + echo "ExecStop=/usr/bin/amnesic $MY_USERNAME" >> /etc/systemd/system/amnesic.service echo '' >> /etc/systemd/system/amnesic.service echo '[Install]' >> /etc/systemd/system/amnesic.service echo 'WantedBy=multi-user.target' >> /etc/systemd/system/amnesic.service