|
|
|
@ -29,10 +29,10 @@ owner="$(cat "$__object/parameter/owner")" |
|
|
|
|
group="$(cat "$__object/parameter/group")" |
|
|
|
|
mode="$(cat "$__object/parameter/mode")" |
|
|
|
|
|
|
|
|
|
[ "$state_should" = "$state_is" -a \ |
|
|
|
|
"$owner" = "$owner_is" -a \ |
|
|
|
|
"$group" = "$group_is" -a \ |
|
|
|
|
-n "$mode" ] && exit 0 |
|
|
|
|
[ "$state_should" = "$state_is" ] && \ |
|
|
|
|
[ "$owner" = "$owner_is" ] && \ |
|
|
|
|
[ "$group" = "$group_is" ] && \ |
|
|
|
|
[ -n "$mode" ] && exit 0 |
|
|
|
|
|
|
|
|
|
destination="/$__object_id" |
|
|
|
|
venvparams="$(cat "$__object/parameter/venvparams")" |
|
|
|
@ -49,8 +49,8 @@ case $state_should in |
|
|
|
|
if [ "$state_should" != "$state_is" ]; then |
|
|
|
|
echo $pyvenv $venvparams "$destination" |
|
|
|
|
fi |
|
|
|
|
if [ \( -n "$owner" -a "$owner_is" != "$owner" \) -o \ |
|
|
|
|
\( -n "$group" -a "$group_is" != "$group" \) ]; then |
|
|
|
|
if { [ -n "$owner" ] && [ "$owner_is" != "$owner" ]; } || \ |
|
|
|
|
{ [ -n "$group" ] && [ "$group_is" != "$group" ]; }; then |
|
|
|
|
echo chown -R "${owner}:${group}" "$destination" |
|
|
|
|
fi |
|
|
|
|
if [ -n "$mode" ]; then |
|
|
|
|