Browse Source
Update systemd services on updates (#638)
Co-authored-by: Luke Childs <lukechilds123@gmail.com>
log-to-ssd
Aaron Dewes
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
8 additions and
0 deletions
-
scripts/update/01-run.sh
|
|
@ -60,6 +60,14 @@ if [[ ! -z "${UMBREL_OS:-}" ]]; then |
|
|
|
if ! command -v unattended-upgrade &> /dev/null; then |
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install unattended-upgrades -y |
|
|
|
fi |
|
|
|
|
|
|
|
# This makes sure systemd services are always updated (and new ones are enabled). |
|
|
|
UMBREL_SYSTEMD_SERVICES="${UMBREL_ROOT}/.umbrel-${RELEASE}/scripts/umbrel-os/services/*.service" |
|
|
|
for service_path in $UMBREL_SYSTEMD_SERVICES; do |
|
|
|
service_name=$(basename "${service_path}") |
|
|
|
install -m 644 "${service_path}" "/etc/systemd/system/${service_name}" |
|
|
|
systemctl enable "${service_name}" |
|
|
|
done |
|
|
|
fi |
|
|
|
|
|
|
|
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json |
|
|
|