WIP: Stop the systemd unit for the container or docker

This commit is contained in:
Jeremy Gardais 2019-10-17 18:49:58 +02:00
parent 917bf83c59
commit 3d6dda4f9a
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 6 additions and 3 deletions

View File

@ -4,9 +4,9 @@
## Backup data of a Docker container.
## To do that, the script will:
## Try to stop the corresponding systemd unit (or docker if no related service is found)
## Make a archive of the container's data to a backup path
## Clean old backup
## Restart the container service (or docker.service)
## TODO: Make a archive of the container's data to a backup path
## TODO: Clean old backup
## TODO: Restart the container service (or docker.service)
# }}}
# How-to use {{{
## First argument should be the absolut path to the container's data.
@ -84,5 +84,8 @@ else
[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG: Service name — Service name of ${ct_name} container to stop: ${ct_service_name} ."
fi
# }}}
# Stop the container service {{{
systemctl stop "${ct_service_name}"
# }}}
exit 0