add reboot for Ubuntu20

This commit is contained in:
Aleksandr Chebotov
2020-11-05 15:53:49 +03:00
parent ff49068542
commit ad583eba90
5 changed files with 22 additions and 6 deletions

View File

@@ -1,9 +1,5 @@
#!/bin/bash -e
export DEBIAN_FRONTEND=noninteractive
apt-get -yq update
apt-get -yq dist-upgrade
# Stop and disable apt-daily upgrade services;
systemctl stop apt-daily.timer
systemctl disable apt-daily.timer

View File

@@ -16,4 +16,7 @@ curl -L https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
apt-get update
# update
apt-get -yq update
apt-get -yq dist-upgrade

View File

@@ -72,6 +72,9 @@
{
"type": "shell",
"script": "{{template_dir}}/scripts/base/apt.sh",
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{

View File

@@ -75,6 +75,9 @@
{
"type": "shell",
"script": "{{template_dir}}/scripts/base/apt.sh",
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{

View File

@@ -74,9 +74,20 @@
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"expect_disconnect": true,
"scripts": [
"{{template_dir}}/scripts/base/reboot.sh"
],
"execute_command": "/bin/sh -c '{{ .Vars }} {{ .Path }}'"
},
{
"type": "shell",
"script": "{{template_dir}}/scripts/base/apt.sh",
"environment_vars": [
"DEBIAN_FRONTEND=noninteractive"
],
"execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'"
},
{