Skip to content

Commit 848df02

Browse files
author
Kristan Kenney
committed
Add v-update-sys-defaults
Trigger function calls in /func/syshealth.sh
1 parent b850b40 commit 848df02

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

bin/v-update-sys-defaults

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
# info: update default key database
3+
# options: [SYSTEM]
4+
# labels:
5+
#
6+
# example: v-update-sys-defaults
7+
# example: v-update-sys-defaults user
8+
#
9+
# The function updates the known key/value pair database
10+
11+
system=$1
12+
13+
# Includes
14+
# shellcheck source=/usr/local/hestia/func/main.sh
15+
source $HESTIA/func/main.sh
16+
# shellcheck source=/usr/local/hestia/func/syshealth.sh
17+
source $HESTIA/func/syshealth.sh
18+
19+
#----------------------------------------------------------#
20+
# Action #
21+
#----------------------------------------------------------#
22+
23+
if [ ! -z "$system" ]; then
24+
syshealth_update_${system}_config_format
25+
else
26+
syshealth_update_web_config_format
27+
syshealth_update_mail_config_format
28+
syshealth_update_dns_config_format
29+
syshealth_update_db_config_format
30+
syshealth_update_user_config_format
31+
fi
32+
33+
#----------------------------------------------------------#
34+
# Hestia #
35+
#----------------------------------------------------------#
36+
log_event "$OK" "$ARGUMENTS"

0 commit comments

Comments
 (0)