WIP: Stop the systemd unit for the container or docker
This commit is contained in:
parent
917bf83c59
commit
3d6dda4f9a
|
@ -4,9 +4,9 @@
|
||||||
## Backup data of a Docker container.
|
## Backup data of a Docker container.
|
||||||
## To do that, the script will :
|
## To do that, the script will :
|
||||||
## Try to stop the corresponding systemd unit (or docker if no related service is found)
|
## 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
|
## TODO : Make a archive of the container's data to a backup path
|
||||||
## Clean old backup
|
## TODO : Clean old backup
|
||||||
## Restart the container service (or docker.service)
|
## TODO : Restart the container service (or docker.service)
|
||||||
# }}}
|
# }}}
|
||||||
# How-to use {{{
|
# How-to use {{{
|
||||||
## First argument should be the absolut path to the container's data.
|
## 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} ."
|
[ "${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
|
fi
|
||||||
# }}}
|
# }}}
|
||||||
|
# Stop the container service {{{
|
||||||
|
systemctl stop "${ct_service_name}"
|
||||||
|
# }}}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue