Collection of bash scripts used to administrate Linux servers
Go to file
Roger Pàmies Fabra 9907ccef25 new script backup gitea, unban with remote f2b and update README 2023-12-07 23:22:39 +01:00
utils new script backup gitea, unban with remote f2b and update README 2023-12-07 23:22:39 +01:00
README.md new script backup gitea, unban with remote f2b and update README 2023-12-07 23:22:39 +01:00
backup_gitea.sh new script backup gitea, unban with remote f2b and update README 2023-12-07 23:22:39 +01:00
backup_nc.sh remove compromised variables values 2023-11-30 23:17:12 +01:00
f2b_unban_ip.sh new script backup gitea, unban with remote f2b and update README 2023-12-07 23:22:39 +01:00
remote_updater.sh done remote_updater 2023-02-01 23:22:02 +01:00
scan_chk.sh set PATH to make sure find all commands when execute script from crontab 2023-07-26 01:04:47 +02:00
scan_clam.sh set PATH to make sure find all commands when execute script from crontab 2023-07-26 01:04:47 +02:00
scan_rkh.sh set PATH to make sure find all commands when execute script from crontab 2023-07-26 01:04:47 +02:00
updates_notifier.sh set PATH to make sure find all commands when execute script from crontab 2023-07-26 01:04:47 +02:00

README.md

Bash Scripts collection

TODO: Need install packages for each script

Permanent enviroment variables in ~/.profile

Append file ~/.profile with this variables:

# E7 Scripts
# ClamAV scan script
export E7S_CLAM_LOGPATH="/path/to/logs/"
# Multiple folders separate by space
export E7S_CLAM_DIRSTOSCAN="/path/to/target/"
# Global script variables
export E7S_GOTIFY_SERVER_URL="https://push.example.com"
export E7S_LOGS_PRESERVE_DAYS=30
export ES7_LOGS_SERVER_SSH="server.example.com"
export ES7_LOGS_PATH="/path/to/web/root/"
export ES7_LOGS_URL="https://logs.example.com"

Scripts

utils/gotifypush.sh

Send markdown notifications to gotify channel throught curl

  • Usage: ./gotifypush.sh <title> <message> <priority> <token> <clickurl>

utils/logger.sh

Save logs into remote server and publish it into web server

  • Usage: ./logger.sh <logfile> <relativepath>

scan_chk.sh

Scan rootkits into system with chkrootkit

  • Usage: ./scan_chk.sh

scan_rkh.sh

Scan rootkits into system with rkhunter

  • Usage: ./scan_rkh.sh

scan_clam.sh

Scan virus and malware into system with clamav

  • Usage: ./scan_clam.sh

updates_notifier.sh

TODO!

Some tips