diff options
Diffstat (limited to 'sysutils/bsdstats/pkg-install')
-rw-r--r-- | sysutils/bsdstats/pkg-install | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sysutils/bsdstats/pkg-install b/sysutils/bsdstats/pkg-install index f4e5450de907..3ab8de033995 100644 --- a/sysutils/bsdstats/pkg-install +++ b/sysutils/bsdstats/pkg-install @@ -33,7 +33,19 @@ yesno() { } if [ ":$2" = ":POST-INSTALL" ]; then - if [ `grep monthly_statistics /etc/periodic.conf | wc -l` = 0 ]; then + if [ -f "/etc/periodic.conf" ]; then + if [ `grep monthly_statistics /etc/periodic.conf | wc -l` = 0 ]; then + if yesno "Would you like to activate monthly reporting in /etc/periodic.conf" n; then + echo "monthly_statistics_enable=\"YES\"" >> /etc/periodic.conf + if yesno "Would you like to send a list of installed hardware as well" n; then + echo "monthly_statistics_report_devices=\"YES\"" >> /etc/periodic.conf + fi + if yesno "Would you like to run it now" y; then + /usr/local/etc/periodic/monthly/300.statistics + fi + fi + fi + elif [ ! -f "/etc/periodic.conf" ]; then if yesno "Would you like to activate monthly reporting in /etc/periodic.conf" n; then echo "monthly_statistics_enable=\"YES\"" >> /etc/periodic.conf if yesno "Would you like to send a list of installed hardware as well" n; then |