Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate both HTTP and HTTPS #42

Merged
merged 1 commit into from
May 1, 2023
Merged

Conversation

jbonplandplesk
Copy link
Contributor

https://jira.plesk.ru/browse/PPS-14235, i guess it should be re written for both http and https:

determine logs' date boundaries

http_log_first_rec_dtime=head -n 1 $http_log | awk -F'[[/:]' '{print $3,$2,$4}' https_log_first_rec_dtime=head -n 1 $https_log | awk -F'[[/:]' '{print $3,$2,$4}' log_first_rec_dtime=$(date -d "$(echo -e "$http_log_first_rec_dtime\n$https_log_first_rec_dtime" | sort -n | head -n1)" +%m/%Y)

log_begin_date=date -d "$log_first_rec_dtime" +%m/%Y date_range=make_date_range "$log_begin_date-$(date +%m/%Y)"

echo " Logs begin on: $log_first_rec_dtime"

https://jira.plesk.ru/browse/PPS-14235 but i guess it should be re written for both http and https:

# determine logs' date boundaries
http_log_first_rec_dtime=`head -n 1 $http_log | awk -F'[[/:]' '{print $3,$2,$4}'`
https_log_first_rec_dtime=`head -n 1 $https_log | awk -F'[[/:]' '{print $3,$2,$4}'`
log_first_rec_dtime=$(date -d "$(echo -e "$http_log_first_rec_dtime\n$https_log_first_rec_dtime" | sort -n | head -n1)" +%m/%Y)

log_begin_date=`date -d "$log_first_rec_dtime" +%m/%Y`
date_range=`make_date_range "$log_begin_date-$(date +%m/%Y)"`

echo "  Logs begin on: $log_first_rec_dtime"
@sibprogrammer sibprogrammer merged commit 3cecda3 into plesk:master May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants