From d187a5d568e39879e227665b5314a072bb372770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Fri, 18 Oct 2019 21:04:08 +0200 Subject: [PATCH] WIP: Restart the container service --- docker/container.backup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker/container.backup b/docker/container.backup index 6b30c82..5c8bdaf 100755 --- a/docker/container.backup +++ b/docker/container.backup @@ -5,7 +5,7 @@ ## 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 -## TODO : Restart the container service (or docker.service) +## Restart the container service (or docker.service) ## TODO : Clean old backup # }}} # How-to use {{{ @@ -101,5 +101,9 @@ fi tar czf "${ct_backup_path}/${ct_name}-backup.$(date '+%Y%m%d-%H%M').tar.gz" --directory "${docker_data_path}" "${ct_name}" [ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Backup data — Data of ${ct_name} container were successfully backuped ${ct_backup_path}/${ct_name}-backup.$(date '+%Y%m%d-%H%M').tar.gz" # }}} +# Restart the container service {{{ +systemctl start "${ct_service_name}" +[ "${DEBUG}" -eq "0" ] && printf '\e[1;35m%-6s\e[m\n' "DEBUG : Service management — Service ${ct_service_name} was started." +# }}} exit 0