Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unattend upgrades [WIP] #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Unattend upgrades [WIP] #2

wants to merge 5 commits into from

Conversation

romanpeters
Copy link
Contributor

Implements unattended-upgrades and common utilities.
Copied from svsticky/sadserver.

Work in progress, since it has not yet been tested.

Copy link
Member

@maartenberg maartenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except for the hotfixes I made to make it work on the macos terminal, maybe worth investigating if this is possible (mainly missing jq).
We probably also want to limit the times of day that the Pi looks for updates, if it starts installing updates at around 16:45 it probably won't finish in time.

# uncomment in case of merge list error
# https://www.ihaveapc.com/2011/05/how-to-fix-problem-with-mergelist-varlibaptlists-error-in-ubuntu-11-04/
#- name: "remove merge list"
# command: "rm /var/lib/apt/lists/* -vf"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be expanded to a file: task I think, but we shouldn't need this anyway.

@@ -44,7 +44,7 @@ read OTPCODE

if [ -n $OTPCODE ]; then
echo "Requesting token with OTP code."
HTTPRESULT=$(get_with_otp $USERNAME $OTPCODE)
HTTPRESULT=$(get_without_otp $USERNAME $OTPCODE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a temporary fix to make it work on OSX, I'll revert this line.

@@ -39,6 +39,6 @@ for team in ${TEAMS[@]}; do
done

echo "Updating authorized-keys template."
mv --backup=numbered .new-authorized-keys templates/home/pi/.ssh/authorized_keys.j2
mv .new-authorized-keys templates/home/pi/.ssh/authorized_keys.j2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants