def SetupFail2ban(): utils.LogStep('Configure fail2ban') # http://flexion.org/posts/2012-11-ssh-brute-force-defence.html utils.Pacman(['-S', 'fail2ban']) utils.WriteFile('/etc/fail2ban/jail.local', ETC_FAIL2BAN_JAIL_LOCAL) utils.WriteFile('/etc/fail2ban/jail.d/sshd.conf', ETC_FAIL2BAN_JAIL_D_SSHD_CONF) utils.EnableService('syslog-ng') utils.EnableService('fail2ban.service')
def OptimizePackages(): utils.LogStep('Cleanup Cached Package Data') utils.Pacman(['-Syu']) utils.Pacman(['-Sc']) utils.Run(['pacman-optimize'])
def InstallImportedPackages(packages_dir): aur_packages_dir = os.path.join(packages_dir, 'aur') for aur_package in os.listdir(aur_packages_dir): utils.Pacman('-U', aur_package, cwd=aur_packages_dir)