Skip to content

Commit 18831ea

Browse files
author
Kristan Kenney
committed
Merge branch 'feature/logging' into feature/user-roles
2 parents 8db4e46 + a4cae59 commit 18831ea

File tree

213 files changed

+427
-194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+427
-194
lines changed

bin/v-add-cron-hestia-autoupdate

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ $BIN/v-restart-cron
9292
check_result $? "Cron restart failed" >/dev/null
9393

9494
# Logging
95-
log_history "enabled automatic updates"
95+
$BIN/v-log-action "system" "Info" "Updates" "Enabled automatic updates for Hestia Control Panel packages."
9696
log_event "$OK" "$ARGUMENTS"
9797

9898
exit

bin/v-add-cron-job

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ $BIN/v-restart-cron
8686
check_result $? "Cron restart failed" >/dev/null
8787

8888
# Logging
89+
$BIN/v-log-action "$user" "Info" "Cron Jobs" "Added cron job $job"
8990
log_history "added cron job $job"
9091
log_event "$OK" "$ARGUMENTS"
9192

bin/v-add-cron-reports

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ $BIN/v-restart-cron
5454
check_result $? "Cron restart failed" >/dev/null
5555

5656
# Logging
57-
log_history "enabled cron reporting"
57+
$BIN/v-log-action "$user" "Info" "Cron Jobs" "Enabled cron job notifications and reporting."
5858
log_event "$OK" "$ARGUMENTS"
5959

6060
exit

bin/v-add-database

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ increase_dbhost_values
9393
increase_user_value "$user" '$U_DATABASES'
9494

9595
# Logging
96-
log_history "added $type database $database"
96+
$BIN/v-log-action "$user" "Info" "Databases" "Added new database $database ($type)."
9797
log_event "$OK" "$ARGUMENTS"
9898

9999
exit

bin/v-add-database-host

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ else
130130
fi
131131

132132
# Logging
133+
$BIN/v-log-action "system" "Info" "Database" "Added external $type database server ($host) to the system."
133134
log_event "$OK" "$ARGUMENTS"
134135

135136
exit

bin/v-add-database-temp-user

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ echo '{
7575
#----------------------------------------------------------#
7676
# Hestia #
7777
#----------------------------------------------------------#
78-
log_history "Granted $dbuser access to $database"
7978

8079
# Logging
80+
$BIN/v-log-action "$user" "Info" "Databases" "Granted user $dbuser access to database $database."
8181
log_event "$OK" "$ARGUMENTS"
8282
exit

bin/v-add-dns-domain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ $BIN/v-restart-dns $restart
218218
check_result $? "DNS restart failed"
219219

220220
# Logging
221-
log_history "added dns domain $domain"
221+
$BIN/v-log-action "$user" "Info" "DNS" "Added new DNS domain (Name: $domain)."
222222
log_event "$OK" "$ARGUMENTS"
223223

224224
exit

bin/v-add-dns-record

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ $BIN/v-restart-dns $restart
149149
check_result $? $E_RESTART 'dns failed to restart'
150150

151151
# Logging
152-
log_history "added $rtype dns record $record for $domain"
152+
$BIN/v-log-action "$user" "Info" "DNS" "Added DNS record (Type: $rtype, Value: $record, Domain: $domain)."
153153
log_event "$OK" "$ARGUMENTS"
154154

155155
exit

bin/v-add-firewall-ban

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ chmod 660 $conf
8888
#----------------------------------------------------------#
8989

9090
# Logging
91+
$BIN/v-log-action "system" "Warning" "Firewall" "Banned IP address $ip."
9192
log_event "$OK" "$ARGUMENTS"
9293

9394
exit

bin/v-add-firewall-chain

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ chmod 660 $chains
103103
#----------------------------------------------------------#
104104

105105
# Logging
106+
$BIN/v-log-action "system" "Info" "Firewall" "Added service to firewall (Service: $chain, Port: $port, Protocol: $protocol)."
106107
log_event "$OK" "$ARGUMENTS"
107108

108109
exit

0 commit comments

Comments
 (0)