Skip to content

Instantly share code, notes, and snippets.

[Unit]
Description=Reboot every monday morning
[Timer]
OnCalendar=Mon 06:00
[Install]
WantedBy=multi-user.target
#!/bin/bash
cd /etc/wireguard
PRIVATE=`wg genkey`
PUBLIC=`echo ${PRIVATE} | wg pubkey`
PSK=`wg genpsk`
CLIENT="$((`cat wg0.conf | tail -n 1 | cut -d . -f 4 | cut -d / -f 1` + 1 + 256 * (`cat wg0.conf | tail -n 1 | cut -d . -f 3 | cut -d / -f 1` - 2)))"
BYTETHREE="$((2 + $CLIENT/255))"
BYTEFOUR="$(($CLIENT%255))"
LogSyslog yes
LocalSocket /run/clamd.scan/clamd.sock
LocalSocketMode 660
FixStaleSocket yes
ExcludePath /proc
ExcludePath /run
ExcludePath /sys
ExcludePath /home/fbouynot/.mozilla/firefox/
ExcludePath /home/fbouynot/.cache/mozilla/firefox/
ExcludePath /home/fbouynot/.config/chromium/
Sanesecurity.Foxhole.Zip_Js_Js.UNOFFICIAL
Sanesecurity.Foxhole.Zip_doc_Js.UNOFFICIAL
Sanesecurity.Foxhole.JS_Zip_1.UNOFFICIAL
Sanesecurity.Foxhole.JS_Zip_2.UNOFFICIAL
Sanesecurity.Foxhole.Zip_fn98.UNOFFICIAL
Sanesecurity.Foxhole.JS_Zip_4.UNOFFICIAL
Sanesecurity.Foxhole.JS_Zip_11.UNOFFICIAL
Sanesecurity.Foxhole.JS_Zip_12.UNOFFICIAL
Sanesecurity.Foxhole.JS_Zip_16.UNOFFICIAL
#!/bin/bash
dnf install clamav clamd clamav-unofficial-sigs -y
setsebool -P antivirus_can_scan_system=on
setsebool -P antivirus_use_jit=on
/usr/bin/freshclam
/usr/bin/clamav-unofficial-sigs.sh
systemctl enable --now clamav-unofficial-sigs.timer
systemctl enable --now clamav-freshclam.service
systemctl enable --now clamd@scan
systemctl enable --now clamonacc
[Unit]
Description=Scan system
[Service]
Type=simple
ExecStart=/usr/bin/clamdscan --multiscan --move=/tmp/quarantine/ /home/
[Unit]
Description=Scan
[Timer]
OnCalendar=*-*-* 4:00:00
[Install]
WantedBy=multi-user.target
#!/bin/bash
for i in `cat emails.txt`
do
echo "Bla,
Blabla
Bla." | mail -s "Object lalala" -r "[email protected]" -S smtp=smtp.example.com ${i}
done
[Unit]
Description=Scheduled Upgrade
[Service]
Type=oneshot
ExecStart=/opt/dist-upgrade.sh
[Unit]
Description=Reboot Dist Upgrade.
[Timer]
OnCalendar=*-5,11-27 20:00:00
[Install]
WantedBy=multi-user.target