Skip to content

Commit 2d14afd

Browse files
author
Kristan Kenney
committed
Update logging in v-scripts
1 parent df690a9 commit 2d14afd

37 files changed

+64
-46
lines changed

bin/v-add-database-host

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +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."
133+
$BIN/v-log-action "system" "Info" "Database" "Added external $type database server ($host) to the system."
134134
log_event "$OK" "$ARGUMENTS"
135135

136136
exit

bin/v-add-user

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ fi
257257
$BIN/v-add-user-sftp-jail $user
258258

259259
# Logging
260-
$BIN/v-log-action "$user" "Info" "Users" "Added user $user to the system."
260+
$BIN/v-log-action "system" "Info" "Users" "User account added (Name: $user)."
261+
$BIN/v-log-action "$user" "Info" "System" "User account added."
261262
log_event "$OK" "$ARGUMENTS"
262263

263264
exit

bin/v-add-user-package

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ chmod 644 $HESTIA/data/packages/$package.pkg
9999
if [ "$rewrite" != 'yes' ]; then
100100
$BIN/v-log-action "system" "Info" "Packages" "Added new package (Name: $package)."
101101
else
102-
$BIN/v-log-action "system" "Info" "Mail" "Updated a package (Name: $package)."
102+
$BIN/v-log-action "system" "Info" "Packages" "Updated package (Name: $package)."
103103
fi
104104
log_event "$OK" "$ARGUMENTS"
105105

bin/v-add-web-domain-backend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ $BIN/v-restart-web-backend $restart
9090
check_result $? "Web backend restart failed" >/dev/null
9191

9292
# Logging
93-
$BIN/v-log-action "$user" "Info" "Web" "Added $WEB_BACKEND backend configuration (Domain: $domain)."
93+
$BIN/v-log-action "system" "Info" "Web" "Added $WEB_BACKEND backend configuration (Domain: $domain)."
9494
log_event "$OK" "$ARGUMENTS"
9595

9696
exit

bin/v-add-web-domain-ssl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,7 @@ if [ ! -z "$UPDATE_SSL_SCRIPT" ]; then
146146
fi
147147

148148
# Logging
149-
$BIN/v-log-action "$user" "Info" "Web" "Enabled SSL (Domain: $domain)."
150-
log_history "enabled ssl support for $domain"
149+
$BIN/v-log-action "$user" "Info" "Web" "Added certificate and enabled SSL (Domain: $domain)."
151150
log_event "$OK" "$ARGUMENTS"
152151

153152
exit

bin/v-change-sys-demo-mode

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ check_result $? "restart" >/dev/null 2>&1
5252

5353
# Logging
5454
if [ "$active" = "yes" ]; then
55-
$BIN/v-log-action "system" "Warn" "System" "Demonstration mode (restricted access) enabled."
55+
$BIN/v-log-action "system" "Warning" "System" "Demonstration mode (restricted access) enabled."
5656
else
57-
$BIN/v-log-action "system" "Warn" "Info" "Demonstration mode (restricted access) disabled."
57+
$BIN/v-log-action "system" "Warning" "Info" "Demonstration mode (restricted access) disabled."
5858
fi
5959

6060

bin/v-change-sys-hostname

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fi
6262
#----------------------------------------------------------#
6363

6464
# Logging
65-
$BIN/v-log-action "system" "Warn" "System" "Changed system hostname (Host: $domain)."
65+
$BIN/v-log-action "system" "Warning" "System" "Changed system hostname (Host: $domain)."
6666
log_event "$OK" "$ARGUMENTS"
6767

6868
exit

bin/v-change-sys-port

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ fi
9393
#----------------------------------------------------------#
9494

9595
# Logging
96-
$BIN/v-log-action "system" "Warn" "System" "Hestia Control Panel backend port changed (New Value: $PORT, Old Value: $ORIGINAL_PORT)."
96+
$BIN/v-log-action "system" "Warning" "System" "Hestia Control Panel backend port changed (New Value: $PORT, Old Value: $ORIGINAL_PORT)."
9797
log_event "$OK" "$ARGUMENTS"
9898

9999
exit

bin/v-change-user-password

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ update_user_value "$user" '$RKEY' "$(generate_password)"
7272
update_user_value "$user" '$MD5' "$md5"
7373

7474
# Logging
75-
$BIN/v-log-action "system" "Warn" "System" "Password changed (User: $user)."
76-
$BIN/v-log-action "$user" "Warn" "System" "Password changed."
75+
$BIN/v-log-action "system" "Warning" "Security" "Password changed (User: $user)."
76+
$BIN/v-log-action "$user" "Warning" "Security" "Password changed."
7777

7878
log_history "changed password"
7979
log_event "$OK" "$ARGUMENTS"

bin/v-change-user-rkey

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ else
6363
fi
6464

6565
# Logging
66-
$BIN/v-log-action "system" "Warn" "Users" "Password reset requested (User: $user)."
66+
$BIN/v-log-action "system" "Warning" "Users" "Password reset requested (User: $user)."
6767
$BIN/v-log-action "$user" "Warn" "System" "Password reset requested."
6868
log_event "$OK" "$ARGUMENTS"
6969

0 commit comments

Comments
 (0)