|
|
@ -67,15 +67,29 @@ function get_container_net0 { |
|
|
echo $SYMPA_NET0 |
|
|
echo $SYMPA_NET0 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function stop_old_container { |
|
|
|
|
|
pct-stop $CONTAINER |
|
|
|
|
|
pct-rename $CONTAINER $CONTAINER.OLD |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function create_new_container{ |
|
|
|
|
|
# miaou-create $CONTAINER |
|
|
|
|
|
# pct-stop $CONTAINER |
|
|
|
|
|
local net1="net1: $(get_container_net0 | cut -d' ' -f2)" |
|
|
|
|
|
echo $net1 |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
# MAIN |
|
|
# MAIN |
|
|
|
|
|
|
|
|
set -Eue |
|
|
set -Eue |
|
|
parse_options $* |
|
|
parse_options $* |
|
|
assert_proxmox |
|
|
assert_proxmox |
|
|
assert_container_sympa_debian9 |
|
|
|
|
|
|
|
|
# assert_container_sympa_debian9 |
|
|
# export_sympa |
|
|
# export_sympa |
|
|
get_container_net0 |
|
|
|
|
|
# 3. stop container |
|
|
|
|
|
|
|
|
# get_container_net0 |
|
|
|
|
|
# stop_old_container |
|
|
|
|
|
create_new_container |
|
|
|
|
|
|
|
|
# 4. create container with same IP |
|
|
# 4. create container with same IP |
|
|
# 5. install sympa |
|
|
# 5. install sympa |
|
|
# 6. import old data |
|
|
# 6. import old data |
|
|
|