manage_term_patches.sh
1 |
#!/bin/bash |
---|---|
2 |
|
3 |
# this must be run as root |
4 |
|
5 |
# delete log files older than 75 days |
6 |
find /var/log/ -type f -name "term_patches_*.log" -mtime +75 -exec rm {} \; |
7 |
|
8 |
# calc new log file name |
9 |
logname="/var/log/term_patches_"$(date '+%Y%m%d_%H%M%S')".log" |
10 |
|
11 |
echo "Patching NCURSES and TERMINFO on "$(date)":" >> $logname 2>&1 |
12 |
cd /root/ |
13 |
|
14 |
# we pass the current directory as the location of our patch input files |
15 |
./patch_ncurses.sh /root >> $logname 2>&1 |
16 |
|
17 |
./patch_terminfo.sh >> $logname 2>&1 |