mirror of
https://git.freebsd.org/ports.git
synced 2025-05-07 19:30:46 -04:00
The filesystems category houses file systems and file system utilities. It is added mainly to turn the sysutils/fusefs-* pseudo-category into a proper one, but is also useful for the sundry of other file systems related ports found in the tree. Ports that seem like they belong there are moved to the new category. Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are not moved as they currently don't fetch and don't have TIMESTAMP set in their distinfo, but that is required to be able to push a rename of the port by the pre-receive hook. Approved by: portmgr (rene) Reviewed by: mat Pull Request: https://github.com/freebsd/freebsd-ports/pull/302 PR: 281988
41 lines
929 B
Bash
41 lines
929 B
Bash
#!/bin/sh
|
|
|
|
# Check zrepl SSL certificates for impending expiration each week
|
|
#
|
|
# Add the following lines to /etc/periodic.conf:
|
|
#
|
|
# weekly_zrepl_enable (bool): Set to "NO" by default
|
|
# weekly_zrepl_warntime (int): Set to one month's worth of seconds by default
|
|
|
|
# If there is a global system configuration file, suck it in.
|
|
#
|
|
if [ -r /etc/defaults/periodic.conf ]
|
|
then
|
|
. /etc/defaults/periodic.conf
|
|
source_periodic_confs
|
|
fi
|
|
|
|
# 30 days in seconds
|
|
: ${weekly_zrepl_warntime="2592000"}
|
|
|
|
rc=0
|
|
case "$weekly_zrepl_enable" in
|
|
[Yy][Ee][Ss])
|
|
echo
|
|
echo "Check Zrepl certificates for upcoming expiration:"
|
|
|
|
for cert in `/usr/bin/find %%ETCDIR%% -maxdepth 1 -name *.crt`; do
|
|
/usr/bin/openssl x509 --in "${cert}" \
|
|
-checkend "${weekly_zrepl_warntime}"
|
|
|
|
if [ $? -gt 0 ]; then
|
|
echo "${cert} will expire soon"
|
|
/usr/bin/openssl x509 --in "${cert}" -noout -enddate
|
|
rc=3
|
|
fi
|
|
done
|
|
;;
|
|
*) rc=0;;
|
|
esac
|
|
|
|
exit $rc
|