update missing bits for __rsync
Signed-off-by: Nico Schottelius <nico@freiheit.schottelius.org>
This commit is contained in:
parent
9d25295e1a
commit
34253a5c30
2 changed files with 9 additions and 9 deletions
|
@ -1,10 +1,10 @@
|
||||||
source_dir=$(cat "$__object/parameter/source-dir")
|
source=$(cat "$__object/parameter/source")
|
||||||
remote_user=$(cat "$__object/parameter/remote-user")
|
remote_user=$(cat "$__object/parameter/remote-user")
|
||||||
|
|
||||||
if [ -f "$__object/parameter/destination-dir" ]; then
|
if [ -f "$__object/parameter/destination" ]; then
|
||||||
destination_dir=$(cat "$__object/parameter/destination-dir")
|
destination=$(cat "$__object/parameter/destination")
|
||||||
else
|
else
|
||||||
destination_dir="$__object_id"
|
destination="$__object_id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set --
|
set --
|
||||||
|
@ -16,4 +16,4 @@ fi
|
||||||
|
|
||||||
echo rsync -a \
|
echo rsync -a \
|
||||||
--no-owner --no-group \
|
--no-owner --no-group \
|
||||||
-q "$@" "${source_dir}/" "${remote_user}@${__target_host}:$destination_dir"
|
-q "$@" "${source}/" "${remote_user}@${__target_host}:${destination}"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
if [ -f "$__object/parameter/destination-dir" ]; then
|
if [ -f "$__object/parameter/destination" ]; then
|
||||||
destination_dir=$(cat "$__object/parameter/destination-dir")
|
destination=$(cat "$__object/parameter/destination")
|
||||||
else
|
else
|
||||||
destination_dir="$__object_id"
|
destination="$__object_id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ownergroup=""
|
ownergroup=""
|
||||||
|
@ -13,5 +13,5 @@ if [ -f "$__object/parameter/group" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$ownergroup" ]; then
|
if [ "$ownergroup" ]; then
|
||||||
echo chown -R "$ownergroup" "$destination_dir"
|
echo chown -R "$ownergroup" "$destination"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue