WIP: Restart the container service

This commit is contained in:
Jeremy Gardais 2019-10-18 21:04:08 +02:00
parent 3ad60f6f39
commit d187a5d568
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 5 additions and 1 deletions

View File

@ -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