WIP: Restart the container service
This commit is contained in:
parent
3ad60f6f39
commit
d187a5d568
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue