Commit graph

468 commits

Author SHA1 Message Date
Benoît S. e9641cda1c Merge branch 'ELASTIC_BACKUP-new-path' of evolix/evocheck into master 2019-07-16 11:41:56 +02:00
Benoît S. 7e04cbec61 phpevolinuxconf: Handle php 7.3 for buster 2019-07-05 15:27:59 +02:00
Benoît S. abd63fe248 All stretch checks must be enabled for buster too 2019-07-05 15:22:30 +02:00
Benoît S. 09e7bbaead Verbose messages for all checks! 2019-07-05 14:43:12 +02:00
Benoît S. b493a13438 log2mailapache: Handle buster case 2019-07-05 10:43:57 +02:00
Benoît S. b5d4f19200 squid: Handle buster case 2019-07-05 10:42:37 +02:00
Benoît S. a11e6f9877 apachemunin: Handle buster case 2019-07-05 10:40:19 +02:00
Benoît S. c094828aff alert5minifw: Handle buster case 2019-07-05 10:37:14 +02:00
Benoît S. bb2a5b5121 alert5boot: Handle buster case 2019-07-05 10:31:46 +02:00
Benoît S. ea005c273b listchangesconf: Handle buster case 2019-07-05 10:24:53 +02:00
Benoît S. bed8d9d59a check_sshpermitrootno: same check for buster as stretch 2019-07-05 10:22:38 +02:00
Benoît S. e7bf343048 Add is_debian_buster function 2019-07-05 10:12:24 +02:00
Benoît S. af04555ae6 Add IS_APT_VALID_UNTIL
If you use archive.debian.org in sources.list you'll need
`Acquire::Check-Valid-Until no;` set in apt config file, otherwise you'll have
errors like:

```
E: Release file for
http://archive.debian.org/debian/dists/jessie-backports/InRelease is expired
(invalid since 44d 11h 3min 25s). Updates for this repository will not be
applied.
```
2019-06-27 15:16:07 +02:00
Benoît S. 84005b8d60 Implement #77 Check that jessie use backports from archive 2019-06-27 14:49:07 +02:00
Benoît S. c0b6e3d474 IS_ELASTIC_BACKUP: New path
According to latest zzz_evobackup, path is /home/backup-elasticsearch
2019-06-21 15:44:39 +02:00
Benoît S. 8702da330d Bump VERSION 2019-06-21 14:31:23 +02:00
Benoît S. 144ae5f7a5 Merge branch 'fix-mysqlnrpe' of evolix/evocheck into master 2019-06-21 14:00:37 +02:00
Benoît S. eb70a0e85f Merge branch 'evomaintenance-api-not-yet-in-production' of evolix/evocheck into master 2019-06-21 11:22:12 +02:00
Benoît S. afb6099f88 We can use multiple packages in is_installed 2019-06-21 11:13:46 +02:00
Benoît S. c4d407417a Rewording, say the package name in verbose mode 2019-06-21 11:02:46 +02:00
Benoît S. 2c8fc41c01 Closes #97. Implement IS_OSPROBER 2019-06-21 10:59:59 +02:00
Jérémy Lecour 6ea7e2ad7c Simplify the check
The original issue is fixed by removing the uotes (qhich fixes the 
expansion).
Then we check only that a check_mysql is configured, without matching 
the whole line.
2019-06-18 16:39:12 +02:00
Jérémy Lecour 3c92290917 fix check_mysqlnrpe
the shell doesn't expand "~nagios", which makes the first test fail.
the grep wasn't looking for the nrpe config file :/
2019-06-07 14:54:47 +02:00
Benoît S. 8b2d789830 Merge branch 'apachesymlink-verbose' 2019-06-06 16:36:04 +02:00
Benoît S. 27350990c5 Merge branch 'diskperf-disabled-for-now' of evolix/evocheck into master 2019-06-06 16:27:29 +02:00
Benoît S. ab92abd3ea EVOMAINTENANCE: API not yet in production!
Remove API check for now.
Revert it when evomaintenance's API will be in production.
2019-06-04 18:01:15 +02:00
Benoît S. 982db855aa APACHE_SYMLINK: Add verbose mode and replace stat by find 2019-06-04 17:48:19 +02:00
Benoît S. 7d5080d496 Closes #91. DISKPERF check is not used anymore
Could be re-added in the future.
2019-06-04 17:05:48 +02:00
Benoît S. cad468af62 apache2.2-common is not installed on Jessie nor Stretch
5 checks were not checked because apache2.2-common was not in dpkg -l output!
Replaced apache2.2-common by apache2.

ii  apache2
2019-06-04 16:57:54 +02:00
Jérémy Lecour d310af3b5c fix shellcheck warnings 2019-04-25 14:10:28 +02:00
Jérémy Lecour a76565dd2d Version 19.04 2019-04-25 13:22:29 +02:00
Nicolas Roman d7bf71a6a1 added API_ENDPOINT and API_KEY fields for the evomaintenance check config 2019-04-25 12:05:07 +02:00
Jérémy Lecour cd4ea09ac6 Add IS_EVOBACKUP_INCS check 2019-04-25 11:55:55 +02:00
Jérémy Lecour 7ec807b3b4 fix return value for minifirewall_file function 2019-04-05 21:35:08 +02:00
Jérémy Lecour 5c055b681b move comments above functions 2019-04-05 15:45:36 +02:00
Jérémy Lecour c93939c306 extract minifirewall_file function 2019-04-05 15:45:36 +02:00
Jérémy Lecour 5160d5a56c Extract functions 2019-04-05 15:45:36 +02:00
Jérémy Lecour 9e50962b17 do not print warnings in quiet mode 2019-04-04 20:52:13 +02:00
Jérémy Lecour 53b86b991f add a break 2019-04-04 18:32:43 +02:00
Jérémy Lecour 4d952b1013 limit Samba check to lenny 2019-04-04 18:30:46 +02:00
Jérémy Lecour 0fa12b0cfd use octal representation of permissions 2019-04-04 18:28:49 +02:00
Jérémy Lecour 7dab67e303 fix typo 2019-04-04 18:25:10 +02:00
Jérémy Lecour e9cee7c4c0 report if blkid is missing 2019-03-25 10:04:40 +01:00
Jérémy Lecour decb3fbb0c bump version 2019-03-24 21:56:20 +01:00
Jérémy Lecour 4547705b45 skip test if munin is not setup in cron mode 2019-03-24 21:52:32 +01:00
Jérémy Lecour 3838f07c3b awstats must be installed to check its configuration 2019-03-24 21:50:51 +01:00
Jérémy Lecour f4b1c96be0 verbose mode for AUTOIF 2019-03-24 21:35:28 +01:00
Jérémy Lecour 809146de52 systemd network configuration is not supported yet 2019-03-24 21:27:16 +01:00
Jérémy Lecour a7abd80f93 Use awk to have a rounded percentage
python is slow
bash supports only integer arithmetics
"bc" can't round to the ceiling
2019-03-24 21:10:47 +01:00
Jérémy Lecour 4136b310c1 fallback to python if bc(1) is missing 2019-03-23 21:09:36 +01:00
Jérémy Lecour e2fb5ae837 fail if lspci is missing 2019-03-23 10:32:53 +01:00
Jérémy Lecour 9cd5e1c325 improve backup detection 2019-03-23 10:32:29 +01:00
Jérémy Lecour 3979b71831 Check for files before going further
Some non conventional servers might have important files or programs 
missing.
2019-03-23 10:18:01 +01:00
Jérémy Lecour 83379f6787 fix excessive quoting
it breaks globbing
2019-03-23 02:36:42 +01:00
Jérémy Lecour 8f255fa392 IS_EVOMAINTENANCEUSERS search trap only in active users home 2019-03-23 02:36:42 +01:00
Jérémy Lecour 4daaf99e36 split IS_EVOMAINTENANCECONF in 3 checks 2019-03-23 02:36:42 +01:00
Jérémy Lecour f377df3370 fix evobakup scripts detection
find returns with 0 even if nothing is found, so we use the number of 
occurences
2019-03-23 02:36:42 +01:00
Jérémy Lecour c9acd91671 Break the loop unless in verbose mode 2019-03-23 02:36:42 +01:00
Jérémy Lecour 8980ca7b69 document -h for help option 2019-03-23 02:36:42 +01:00
Jérémy Lecour 140a5d1a84 typo 2019-03-23 02:36:42 +01:00
Jérémy Lecour 3598154e4a find user's home directory via getent(1) 2019-03-23 02:36:42 +01:00
Jérémy Lecour 48cbf6385f improve reserved blocks math
bc(1) round to the lower integer, so we add 1 to always be around the 
ceiling.
2019-03-23 02:36:42 +01:00
Jérémy Lecour df9af8061d log if not QUIET 2019-03-23 02:36:42 +01:00
Jérémy Lecour 7702a8dd84 Add options parsing (verbose/quiet/cron/help/version) 2019-03-23 02:36:42 +01:00
Jérémy Lecour 2fdc3338fd Disable a few shellcheck style warnings 2019-03-23 02:36:42 +01:00
Jérémy Lecour a7bfbe0a19 awk instead of tr | cut 2019-03-23 02:36:42 +01:00
Jérémy Lecour 3591e265c8 grep -c instead of grep | wc -l 2019-03-23 02:36:42 +01:00
Jérémy Lecour 92754deef0 whitespaces 2019-03-23 02:36:42 +01:00
Jérémy Lecour 8f46b6c811 variable extraction 2019-03-23 02:36:42 +01:00
Jérémy Lecour 97b13b2a60 cut < file instead of cat file | cut 2019-03-23 02:36:42 +01:00
Jérémy Lecour fa53e1a293 command grouping with braces 2019-03-23 02:36:42 +01:00
Jérémy Lecour 1c0f00c473 quotes 2019-03-23 02:36:42 +01:00
Jérémy Lecour 9861e22614 test command return value directly 2019-03-23 02:36:42 +01:00
Jérémy Lecour 8254877240 Add IS_ETCGIT to check for /etc.git Git repository 2019-03-23 02:36:42 +01:00
Jérémy Lecour ae0b3ae2f1 Use bc (instead of python) to have a rounded percentage 2019-03-23 02:36:42 +01:00
Jérémy Lecour 4f8a9ceecc fix quotes 2019-03-23 02:36:42 +01:00
Jérémy Lecour a8178598e9 use braces instead of parenthesis 2019-03-23 02:36:41 +01:00
Jérémy Lecour 3a484cf694 add quotes 2019-03-23 02:36:41 +01:00
Jérémy Lecour c073f5ca87 homeDir is useless here 2019-03-23 02:36:41 +01:00
Jérémy Lecour 0fe664f571 rework the EVOACME check 2019-03-23 02:36:41 +01:00
Jérémy Lecour 55f720972b add a lot of verbose output 2019-03-23 02:36:41 +01:00
Jérémy Lecour 8957b19a96 reorganize IS_EVOMAINTENANCEUSERS 2019-03-23 02:36:41 +01:00
Jérémy Lecour 4a70693114 conditional readability 2019-03-23 02:36:41 +01:00
Jérémy Lecour cfb4602bed extract variable 2019-03-23 02:36:41 +01:00
Jérémy Lecour 5b9d41de0c wording 2019-03-23 02:36:41 +01:00
Jérémy Lecour 76354bed48 extract variable 2019-03-23 02:36:41 +01:00
Jérémy Lecour a01b53111d OpenBSD version detection 2019-03-23 02:36:41 +01:00
Jérémy Lecour 8aadbed4de Don't limit to Lenny
This test doesn't seem to be limited to Lenny, so we should check for 
all backports
2019-03-23 02:36:41 +01:00
Jérémy Lecour c2fda32d0d extract main conditional 2019-03-23 02:36:41 +01:00
Jérémy Lecour 3b8617b20c use grep -s instead of redirecting stderr 2019-03-23 02:36:41 +01:00
Jérémy Lecour 7cb7a47be7 improve readability 2019-03-23 02:36:41 +01:00
Jérémy Lecour 0afdfbf3a1 Use braces instead for command grouping.
It avoids subshells
2019-03-23 02:36:40 +01:00
Jérémy Lecour 9658e531ad quotes 2019-03-23 02:36:40 +01:00
Jérémy Lecour 2267b79618 remove unused IS_TOOMUCHDEBIANSYSMAINT 2019-03-23 02:36:40 +01:00
Jérémy Lecour fc3d2e28cf APACHEMUNIN: muunin config can be in other files 2019-03-23 02:36:40 +01:00
Jérémy Lecour a4c1629912 verbose comments for RAID checks 2019-03-23 02:36:40 +01:00
Jérémy Lecour d51c64d410 reorganize IS_APACHEMUNIN 2019-03-23 02:36:40 +01:00
Jérémy Lecour 3353096ebe don't use a sub shell for IS_REPVOLATILE 2019-03-23 02:36:40 +01:00
Jérémy Lecour 366fc03237 print duplicate labels on a single line 2019-03-23 02:36:40 +01:00
Jérémy Lecour 9b31ab030e fix "is_debian_lenny" 2019-03-23 02:36:40 +01:00
Jérémy Lecour 2ad82591f3 test if it's a file, to ignore directories 2019-03-23 02:36:40 +01:00
Jérémy Lecour c3b4efd71e fix debian version detection for IS_LSBRELEASE 2019-03-23 02:36:40 +01:00
Jérémy Lecour e525141ae4 move VERBOSE block to log comment 2019-03-23 02:36:40 +01:00
Jérémy Lecour 419ecbc10f fix conditions grouping 2019-03-23 02:36:40 +01:00
Jérémy Lecour 367756d6b2 variables extraction 2019-03-23 02:36:40 +01:00
Jérémy Lecour 99ddd1a05c better test ordering 2019-03-23 02:36:40 +01:00
Jérémy Lecour 3e14210a0b extract if 2019-03-23 02:36:40 +01:00
Jérémy Lecour 9dcdd8202e more permissions check with stat 2019-03-23 02:36:40 +01:00
Jérémy Lecour 057cb7026a even more quotes 2019-03-23 02:36:40 +01:00
Jérémy Lecour 0fc9d0921e grep can count occurrences too 2019-03-23 02:36:40 +01:00
Jérémy Lecour ae12b37c7f add verbose comments for IS_BACKPORTSCONF 2019-03-23 02:36:40 +01:00
Jérémy Lecour 830db4743c more quotes 2019-03-23 02:36:40 +01:00
Jérémy Lecour 38b0342d0c use stat instead of ls -l | grep 2019-03-23 02:36:10 +01:00
Jérémy Lecour 00311e8f0e quote 2019-03-23 02:36:10 +01:00
Jérémy Lecour fa79f1d1a8 big cleanup
* tests organization
* shellcheck conventions
* variables extractions
* quotes and indentations
2019-03-23 02:36:10 +01:00
Jérémy Lecour 2c44db77a3 replace `` with $() 2019-03-23 02:30:18 +01:00
Jérémy Lecour 720ea03b0c Add IS_LSBRELEASE check 2019-03-23 02:29:24 +01:00
Jérémy Lecour 36fa3af815 replace old-fashioned tests with functions 2019-03-23 02:29:24 +01:00
Jérémy Lecour d3cb743f76 MINIFW_FILE for Debian Lenny 2019-03-23 02:28:53 +01:00
Jérémy Lecour 1b4b2a2ff8 workaround possibly missing lsb_release command 2019-03-23 02:28:53 +01:00
Jérémy Lecour 9c4a40b585 optimize OS/release/version detection 2019-03-23 02:28:53 +01:00
Jérémy Lecour da2b48d792 no tabs, but 4 spaces 2019-03-21 21:19:53 +01:00
Jérémy Lecour b7ce862073 fix indentation levels 2019-03-21 21:15:48 +01:00
Jérémy Lecour f3caffc9d5 Improve logging with optional verbose comment (#71) 2019-03-21 14:27:34 +01:00
Benoît S. 7cc422974a IS_NOTUPGRADED: Better detection of upgrades
Fix #66
2019-03-05 11:27:53 +01:00
Benoît S. cf8ad6c4d8 Merge branch '62-IS_NOTUPGRADED-quiet-grep' of evolix/evocheck into master 2019-02-22 10:31:38 +01:00
Benoît S. f783d2bb3f Quiet grep by adding -s
Otherwhise it would ouput
`grep: /etc/evolinux/listupgrade.cnf: No such file or directory`.
2019-02-21 15:59:21 +01:00
Benoît S. a6ee33004e Closes #59 IS_MYSQLUTILS: Fixed wrong logic (#60) 2019-02-20 17:52:30 +01:00
Benoît S. 3f0b40e34e Merge branch '54-fixes-IS_LISTCHANGESCONF-verbose-mode' of evolix/evocheck into master 2019-02-19 15:07:24 +01:00
Benoît S. 65c97eb7be Fixes and closes #29 by adding silent grep 2019-02-19 11:24:01 +01:00
Benoît S. 62bcb5a71d Fixes #54 by refactoring IS_LISTCHANGESCONF
Verbose mode previously added was misbehaving.
Also refactored the code for more readability.
2019-02-19 10:43:51 +01:00
Benoît S. 9be91392f3 Merge branch 'IS_EVOLIX_USER-do-not-use-getent' of evolix/evocheck into master 2019-02-14 11:19:32 +01:00
Benoît S. 2fe9d4ea0e Merge branch 'IS_BACKPORTSCONF-really-quiet-grep' of evolix/evocheck into master 2019-02-14 11:19:19 +01:00
Benoît S. 7ccf640e4c Merge branch 'IS_DUPLICATE_FS_LABEL-exclude-EFI_SYSPART' of evolix/evocheck into master 2019-02-14 11:18:57 +01:00
Benoît S. b7c3b3fadc Merge branch 'IS_DUPLICATE_FS_LABEL-add-verbose-mode' of evolix/evocheck into master 2019-02-14 11:18:41 +01:00
Benoît S. 38c8c75248 IS_EVOLIX_USER: Do not use getent
Why? Because of LDAP. It is normal to have an evolix user in LDAP but not in
`/etc/passwd`.
2019-02-12 12:48:28 +01:00
Benoît S. 1aad813663 IS_BACKPORTSCONF: Quiet grep and better readability
Added `-s` to grep to not have error messages like:
`grep: /etc/apt/preferences.d/*: No such file or directory`
And don't use `2>/dev/null` as there is `-s` grep option!

Added if condition for better readability of the code.
2019-02-12 12:38:11 +01:00
Benoît S. 77afe63bc5 IS_DUPLICATE_FS_LABEL: Exclude EFI_SYSPART
EFI_SYSPART is (and should be) on all disks when using soft raid.
2019-02-12 12:10:42 +01:00
Benoît S. a099ba5f40 IS_DUPLICATE_FS_LABEL: Add verbose mode 2019-02-12 12:03:59 +01:00
Benoît S. 1a3e1615a8 Fix #42 By using better logic
If the system hasn't received any upgrade, check the install date.
2019-02-12 11:48:56 +01:00
Benoît S. a9d26a49b4 Merge branch 'verbose-islistchangesconf' of evolix/evocheck into master 2019-02-01 14:41:16 +01:00
Jérémy Lecour f3b5e8f9b7 echo needs to be there only once 2019-01-30 18:06:28 +01:00
Jérémy Lecour 83f4b01789 Add verbose message for IS_LISTCHANGESCONF 2019-01-30 17:49:57 +01:00
Victor Laborie fd5b9cd86c Merge branch 'IS_EVOMAINTENANCEUSERS-verbose-mode' of evolix/evocheck into master 2019-01-25 11:32:21 +01:00
Benoît S. fbce70f906 New version of IS_EVOMAINTENANCEUSERS
Verbose mode added
Break added
Better readability
2019-01-25 11:11:16 +01:00
Benoît S. d1317eb087 This new version exclude .bak and .date directories. 2019-01-25 10:40:51 +01:00
Benoît S. 5fc78550f3 Better readability and verbose messages 2019-01-18 15:14:40 +01:00
Benoît S. fd11189400 Merge branch 'master' into 17-IS_MYSQLUTILS-with-oracle-MySQL5.7 2019-01-18 14:50:12 +01:00
Benoît S. 0a3ae1ceca Merge branch '47-is_notupgraded-var-log-evolinux-00_prepare_system-log-is-deprecated' 2019-01-17 15:30:55 +01:00
Victor LABORIE 671bdbd92b Rewrite IS_OLD_HOME_DIR with find (fix output order in verbose mode) 2019-01-17 11:55:51 +01:00