algo/roles/privacy/templates/clear-history-on-logout.sh.j2
Dan Guido db02a8f8aa feat: Comprehensive privacy enhancements
- Add no_log directives to all cloud provider credential handling
- Set privacy-focused defaults (StrongSwan logging disabled, DNSCrypt syslog off)
- Implement privacy role with log rotation, history clearing, and log filtering
- Add Privacy Considerations section to README
- Make all privacy features configurable and enabled by default

This update significantly reduces Algo's logging footprint to enhance user privacy
while maintaining the ability to enable logging for debugging when needed.
2025-08-03 03:42:14 -04:00

36 lines
No EOL
777 B
Django/Jinja

#!/bin/bash
# Privacy-enhanced history clearing on logout
# This script clears command history when users log out
# Generated by Algo VPN privacy role
{% if privacy_history_clearing.clear_bash_history %}
# Clear bash history
if [ -f ~/.bash_history ]; then
> ~/.bash_history
fi
# Clear zsh history
if [ -f ~/.zsh_history ]; then
> ~/.zsh_history
fi
# Clear current session history
history -c
history -w
# Clear less history
if [ -f ~/.lesshst ]; then
rm -f ~/.lesshst
fi
# Clear vim history
if [ -f ~/.viminfo ]; then
rm -f ~/.viminfo
fi
{% endif %}
{% if privacy_history_clearing.clear_system_history %}
# Clear temporary files in user directory
find ~/tmp -type f -delete 2>/dev/null || true
find ~/.cache -type f -delete 2>/dev/null || true
{% endif %}