cweagans / docker-bg-sync

A container that syncs files between two configurable directories.
223 stars 39 forks source link

Added: more best practice; fixed user/group creation #18

Closed dj95 closed 3 years ago

dj95 commented 6 years ago

I run into an issue, where so bg-sync-container crashed while starting because the group created in line 25 of the recent version of the sync.sh returned a non-zero exit code(9).

With this pull request the group and user is only created when it doesn't exist, which eliminates the error, that happened.

In the same case I also tried to use more best practice bash techniques, according to rules in https://github.com/progrium/bashstyle.

cweagans commented 6 years ago

I'm open to a rename, but please do that in a different PR. It's now impossible to review what actually changed.

dj95 commented 6 years ago

I'm going to split these up, if you'd like to. But the diff will be similar to this one because I indented the whole script into a main-function. Let me split this up in multiple commits in order to make your review easier.