Skip to content

Commit 2d66a47

Browse files
authored
3289 [Bug] awstats not updated by logrotate (hestiacp#3297)
* Fix hestiacp#3289 Awasts errors * Update installers to replace apache2 log rotate * Forgot to commit the change * Fix output email * Update for upgrades
1 parent 79dcf9e commit 2d66a47

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
3+
# Changes made by HestiaCP due to https://github.com/hestiacp/hestiacp/issues/3289
4+
/usr/local/hestia/bin/v-update-sys-queue webstats

install/hst-install-debian.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,6 +1035,8 @@ systemctl restart ssh
10351035

10361036
# Disable AWStats cron
10371037
rm -f /etc/cron.d/awstats
1038+
# Replace awstatst function
1039+
cp -f $HESTIA_INSTALL_DIR/logrotate/httpd-prerotate/* /etc/logrotate.d/httpd-prerotate/
10381040

10391041
# Set directory color
10401042
if [ -z "$(grep 'LS_COLORS="$LS_COLORS:di=00;33"' /etc/profile)" ]; then
@@ -2112,9 +2114,9 @@ Ready to get started? Log in using the following credentials:
21122114
21132115
Admin URL: https://$servername:$port"
21142116
if [ "$host_ip" != "$ip" ]; then
2115-
echo " Backup URL: https://$ip:$port"
2117+
echo -n " Backup URL: https://$ip:$port"
21162118
fi
2117-
echo -e " Username: admin
2119+
echo -e -n " Username: admin
21182120
Password: $displaypass
21192121
21202122
Thank you for choosing Hestia Control Panel to power your full stack web server,

install/hst-install-ubuntu.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,8 @@ systemctl restart ssh
10361036

10371037
# Disable AWStats cron
10381038
rm -f /etc/cron.d/awstats
1039+
# Replace awstatst function
1040+
cp -f $HESTIA_INSTALL_DIR/logrotate/httpd-prerotate/* /etc/logrotate.d/httpd-prerotate/
10391041

10401042
# Set directory color
10411043
if [ -z "$(grep 'LS_COLORS="$LS_COLORS:di=00;33"' /etc/profile)" ]; then
@@ -2160,11 +2162,11 @@ You have successfully installed Hestia Control Panel on your server.
21602162
21612163
Ready to get started? Log in using the following credentials:
21622164
2163-
Admin URL: https://$servername:$port"
2165+
Admin URL: https://$servername:$port" > $tmpfile
21642166
if [ "$host_ip" != "$ip" ]; then
2165-
echo " Backup URL: https://$ip:$port"
2167+
echo " Backup URL: https://$ip:$port" >> $tmpfile
21662168
fi
2167-
echo -e " Username: admin
2169+
echo -e -n " Username: admin
21682170
Password: $displaypass
21692171
21702172
Thank you for choosing Hestia Control Panel to power your full stack web server,
@@ -2189,7 +2191,7 @@ Sincerely yours,
21892191
The Hestia Control Panel development team
21902192
21912193
Made with love & pride by the open-source community around the world.
2192-
" > $tmpfile
2194+
" >> $tmpfile
21932195

21942196
send_mail="$HESTIA/web/inc/mail-wrapper.php"
21952197
cat $tmpfile | $send_mail -s "Hestia Control Panel" $email

install/upgrade/versions/1.7.0.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ if echo "$BACKUP_SYSTEM" | grep "google" > /dev/null; then
100100
add_upgrade_message "Deprecation notice: Backup via Google Cloud has been removed setup backup again via Rclone to reinstate the backup and restore capebilities!"
101101
fi
102102

103+
if [ -f /etc/logrotate.d/httpd-prerotate/awstats ]; then
104+
echo "[ * ] Update Awstats prerotate to Hestia update method"
105+
# Replace awstatst function
106+
cp -f $HESTIA_INSTALL_DIR/logrotate/httpd-prerotate/awstats /etc/logrotate.d/httpd-prerotate/
107+
fi
108+
103109
if [ "$PHPMYADMIN_KEY" != "" ]; then
104110
echo "[ * ] Refresh hestia-sso for PMA..."
105111
$BIN/v-delete-sys-pma-sso quiet

0 commit comments

Comments
 (0)