|
@ -5,7 +5,7 @@ if [[ -d /opt/debian-bash ]]; then |
|
|
fi |
|
|
fi |
|
|
remote_release=$(wget_semver artcode pvincent/debian-bash) |
|
|
remote_release=$(wget_semver artcode pvincent/debian-bash) |
|
|
|
|
|
|
|
|
if [[ $local_release != $remote_release ]];then |
|
|
|
|
|
|
|
|
if [[ $local_release != $remote_release ]]; then |
|
|
echo "upgrading from <$local_release> to <$remote_release> ..." |
|
|
echo "upgrading from <$local_release> to <$remote_release> ..." |
|
|
curl https://git.artcode.re/pvincent/debian-bash/raw/master/install.sh | sudo bash -s -- --full |
|
|
curl https://git.artcode.re/pvincent/debian-bash/raw/master/install.sh | sudo bash -s -- --full |
|
|
else |
|
|
else |
|
@ -14,9 +14,9 @@ else |
|
|
# install inside active LXC containers |
|
|
# install inside active LXC containers |
|
|
if [[ -f '/snap/bin/lxc' ]]; then |
|
|
if [[ -f '/snap/bin/lxc' ]]; then |
|
|
echo "refreshing containers ..." |
|
|
echo "refreshing containers ..." |
|
|
for container in `lxc list --format=json | jq -r '.[] | select(.state.status == "Running") | .name'`; do |
|
|
|
|
|
|
|
|
for container in $(lxc list --format=json | yq '.[] | select(.state.status == "Running") | .name' -); do |
|
|
container_release=$(lxc exec $container -- cat /opt/debian-bash/.semver_git_tag) |
|
|
container_release=$(lxc exec $container -- cat /opt/debian-bash/.semver_git_tag) |
|
|
if [[ $container_release != $remote_release ]];then |
|
|
|
|
|
|
|
|
if [[ $container_release != $remote_release ]]; then |
|
|
echo "upgrade container <$container> from <$container_release> to <$remote_release>" |
|
|
echo "upgrade container <$container> from <$container_release> to <$remote_release>" |
|
|
/snap/bin/lxc file push /opt/debian-bash "${container}/opt/" -r |
|
|
/snap/bin/lxc file push /opt/debian-bash "${container}/opt/" -r |
|
|
else |
|
|
else |
|
@ -25,4 +25,4 @@ else |
|
|
done |
|
|
done |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
fi |