use omv_config_update instead of xmlstarlet

This commit is contained in:
Aaron Murray 2020-06-03 19:34:42 -05:00
parent 22ca235bc5
commit 89430c8b35

12
install
View File

@ -276,12 +276,12 @@ else
fi fi
# change default OMV settings # change default OMV settings
xmlstarlet ed -L -u "/config/services/smb/extraoptions" -v "$(echo -e "${smbOptions}")" ${OMV_CONFIG_FILE} omv_config_update "/config/services/smb/extraoptions" "$(echo -e "${smbOptions}")"
xmlstarlet ed -L -u "/config/services/ssh/enable" -v "1" ${OMV_CONFIG_FILE} omv_config_update "/config/services/ssh/enable" "1"
xmlstarlet ed -L -u "/config/services/ssh/permitrootlogin" -v "1" ${OMV_CONFIG_FILE} omv_config_update "/config/services/ssh/permitrootlogin" "1"
xmlstarlet ed -L -u "/config/system/time/ntp/enable" -v "1" ${OMV_CONFIG_FILE} omv_config_update "/config/system/time/ntp/enable" "1"
xmlstarlet ed -L -u "/config/system/time/timezone" -v "${tz}" ${OMV_CONFIG_FILE} omv_config_update "/config/system/time/timezone" "${tz}"
xmlstarlet ed -L -u "/config/system/network/dns/hostname" -v "${hostname}" ${OMV_CONFIG_FILE} omv_config_update "/config/system/network/dns/hostname" "${hostname}"
# disable monitoring and apply changes # disable monitoring and apply changes
/usr/sbin/omv-rpc -u admin "perfstats" "set" '{"enable":false}' /usr/sbin/omv-rpc -u admin "perfstats" "set" '{"enable":false}'