File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 4646 if yesno_box_yes " Do you want to remove the Imaginary and all it's settings?"
4747 then
4848 # Remove docker container
49- docker_prune_this ' nextcloud/aio-imaginary'
49+ docker_prune_this ' nextcloud/aio-imaginary' ' imaginary '
5050 # reset the preview formats
5151 nextcloud_occ config:system:delete " preview_imaginary_url"
5252 nextcloud_occ config:system:delete " enabledPreviewProviders"
Original file line number Diff line number Diff line change @@ -1751,15 +1751,22 @@ fi
17511751}
17521752
17531753# Remove selected Docker image
1754- # docker_prune_this 'collabora/code' 'onlyoffice/documentserver' 'ark74/nc_fts' 'nextcloud/aio- imaginary'
1754+ # docker_prune_this 'collabora/code' 'onlyoffice/documentserver' 'ark74/nc_fts' 'imaginary'
17551755docker_prune_this () {
17561756if does_this_docker_exist " $1 "
17571757then
17581758 if yesno_box_yes " Do you want to remove $1 ?"
17591759 then
1760- docker stop " $( docker container ls -a | grep " $1 " | awk ' {print $1}' | tail -1) "
1761- docker rm " $( docker container ls -a | grep " $1 " | awk ' {print $1}' | tail -1) " --volumes
1760+ CONTAINER=" $( docker container ls -a | grep " $1 " | awk ' {print $1}' | tail -1) "
1761+ if [ -z " $CONTAINER " ]
1762+ then
1763+ # Special solution if the container name is scrambled, then search for the actual name instead
1764+ CONTAINER=" $( docker container ls -a | grep " $2 " | awk ' {print $1}' | tail -1) "
1765+ fi
1766+ docker stop " $CONTAINER "
1767+ docker rm " $CONTAINER "
17621768 docker image prune -a -f
1769+ docker system prune -a -f
17631770 else
17641771 msg_box " OK, this script will now exit, but there's still leftovers to cleanup. You can run it again at any time."
17651772 exit
You can’t perform that action at this time.
0 commit comments