sync host

This commit is contained in:
Emmanuel Garette 2019-02-25 11:56:15 +01:00
parent b06123cc04
commit 4c7ebd5d27

View File

@ -44,8 +44,7 @@ function sync_host()
{ {
CMD="onehost" CMD="onehost"
OPT="sync -f --rsync" OPT="sync -f --rsync"
AUTH=$(get_one_auth) res=$(su - oneadmin -c "${CMD} ${OPT}")
res=$(su - oneadmin -c "${CMD} ${OPT} --user ${AUTH%:*} --password ${AUTH#*:}")
if [[ ${?} -ne 0 ]] if [[ ${?} -ne 0 ]]
then then
error "Hosts sync failed" error "Hosts sync failed"