auanasgheps / snapraid-aio-script

The definitive all-in-one SnapRAID script on Linux. Diff, sync, scrub are things of the past. Manage SnapRAID and much, much more!
GNU General Public License v3.0
231 stars 37 forks source link

Update to allow script to manage docker containers on multiple remote hosts #24

Closed tehniemer closed 2 years ago

tehniemer commented 2 years ago

I made some updates to the way remote hosts are handled to allow management across multiple IP addresses. I had to change a few things in the way IFS was used in the config file to allow this to work. This is working to pause containers on three machines I have docker services on.

auanasgheps commented 2 years ago

Hello! Thanks for this contribution. I don't have the time to review it now, but I want to ensure it doesn't affect other functionalities, especially the IFS condition.

auanasgheps commented 2 years ago

Hi @tehniemer, I've done some testing and everything looks good, so the IFS modifications haven't impacted other areas of the script.

The only thing I don't like is that standard containers are separated by a space, instead remote containers use comma without spaces.

Do you think you can adjust the remote containers to use space?

tehniemer commented 2 years ago

I did try that at first, but couldn't get it to work. Bash can't handle multidimensional arrays and this was the only way I could figure out how to approximate one given my limited scripting knowledge. I can take another look, but it may take some time.

auanasgheps commented 2 years ago

I did try that at first, but couldn't get it to work. Bash can't handle multidimensional arrays and this was the only way I could figure out how to approximate one given my limited scripting knowledge. I can take another look, but it may take some time.

My scripting capabilities are limited too, so don't worry. I'll merge and make some adjustments to the comments to make the requirements clear.

I'll ask some friends who know bash, but if you eventually figure it it out you can always make another PR.