Skip to content

Commit 017d8ef

Browse files
author
Kristan Kenney
committed
Update logging in v-scripts
1 parent 5938059 commit 017d8ef

File tree

216 files changed

+351
-202
lines changed

Some content is hidden

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

216 files changed

+351
-202
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" "Databases" "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
@@ -208,7 +208,7 @@ $BIN/v-restart-dns $restart
208208
check_result $? "DNS restart failed"
209209

210210
# Logging
211-
log_history "added dns domain $domain"
211+
$BIN/v-log-action "$user" "Info" "DNS" "Added new DNS domain (Name: $domain)."
212212
log_event "$OK" "$ARGUMENTS"
213213

214214
exit

bin/v-add-dns-record

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

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

152152
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)