Skip to content

Commit

Permalink
chore: remove unattended-upgrades service (mainsail-crew#215)
Browse files Browse the repository at this point in the history
* chore: remove unattended-upgrades service

This only applies if service exists and armbian devices.

Signed-off-by: Stephan Wendel <me@stephanwe.de>
---------

Signed-off-by: Stephan Wendel <me@stephanwe.de>
  • Loading branch information
KwadFan authored Apr 2, 2023
1 parent 9db6898 commit 9f09363
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions src/modules/armbian/start_chroot_script
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ echo "${BASE_USER} ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers
apt update
# shellcheck disable=SC2086
check_install_pkgs ${ARMBIAN_DEPS}
## END Step 1



## Step 1: Manage groups
## Step 2: Manage groups
### Substep 1: Create group for gpio usage
sudo groupadd gpio
### END Substep 1
Expand All @@ -59,18 +59,19 @@ sudo groupadd gpio
if_group_exists_run i2c usermod -aG i2c "${BASE_USER}"
usermod -aG video,audio,plugdev,games,netdev,sudo,systemd-journal,gpio "${BASE_USER}"
### END Substep 2
## END Step 2

## Step 2: patch sshd_config
## Step 3: patch sshd_config
sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config
sed -i 's/^X11Forwarding/#X11Forwarding/' /etc/ssh/sshd_config
sed -i 's/^#MaxAuthTries 6/MaxAuthTries 3/' /etc/ssh/sshd_config
## END
## END Step 3

## Step 4: Try patching first login in build stage
if [[ -f "/root/.not_logged_in_yet" ]]; then
rm -f /root/.not_logged_in_yet
fi
## END
## END Step 4

## Step 5: Move armbian-release to display mainsailos-release
### Substep 1: Move armbian-release
Expand All @@ -92,7 +93,7 @@ fi
sed -i "s|/etc/armbian-release|/etc/armbian-release-info.txt|g" "${f}"
done
popd &> /dev/null || exit 1
## END
## END Step 5

## Step 6: Patch dynamic motd
echo_green "Patch dynamic motd ..."
Expand All @@ -101,7 +102,7 @@ chmod +x /etc/update-motd.d/*
if [[ -f "/etc/default/armbian-motd" ]]; then
sed -i 's/MOTD_DISABLE=""/MOTD_DISABLE="header"/' /etc/default/armbian-motd
fi
## END
## END Step 6

## Step 7: Enable SPI interface by default
echo_green "Enable SPI interface on Orange Pi SBC's ..."
Expand All @@ -128,4 +129,9 @@ echo "spi-dev" >> "${ARMBIAN_MODULES_FILE}"
### END Substep 3

echo_green "Enable SPI interface on Orange Pi SBC's ... DONE!"
## END
## END Step 7

## Step 8: Remove unattended-upgrades
echo_green "Remove 'unattended-upgrades' service ..."
sudo apt-get remove --purge --yes unattended-upgrades
## END Step 8

0 comments on commit 9f09363

Please sign in to comment.