auto-updater: rename systemd service from auto_updater to auto-updater #1129

Closed
JakeHillion wants to merge 1 commits from feature/yqqwkkkvwvwp into main
pull from: feature/yqqwkkkvwvwp
4 changed files with 13 additions and 13 deletions

No files matched your search

@@ -119,9 +119,9 @@
systemd.services.boot-control = {
description = "Boot Control Service - Check Home Assistant for Windows boot preference";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" "auto_updater.service" ];
after = [ "network-online.target" "auto-updater.service" ];
wants = [ "network-online.target" ];
requires = [ "auto_updater.service" ];
requires = [ "auto-updater.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = false;
@@ -35,17 +35,17 @@ in
"d ${location} 0755 root root - -"
];
systemd.timers.auto_updater = {
systemd.timers."auto-updater" = {
wantedBy = [ "timers.target" ];
timerConfig = {
OnBootSec = "15m";
OnUnitInactiveSec = "60m";
RandomizedDelaySec = "30m";
Unit = "auto_updater.service";
Unit = "auto-updater.service";
};
};
systemd.services.auto_updater = {
systemd.services."auto-updater" = {
description = "Automatically update NixOS configuration if already on main.";
after = [ "network-online.target" ];
+1 -1
View File
@@ -2,7 +2,7 @@
{
imports = [
./auto_updater.nix
./auto-updater.nix
./backups
./chia.nix
./compressed_ram.nix
+7 -7
View File
@@ -18,7 +18,7 @@ let
exec sudo ${pkgs.runtimeShell} "$0" "$@"
fi
# Create lock file to prevent auto_updater from running
# Create lock file to prevent auto-updater from running
LOCK_FILE="/run/nixos-update.lock"
echo "Creating update lock file..."
touch "$LOCK_FILE"
@@ -27,14 +27,14 @@ let
# Set up trap to clean up lock file on exit
trap 'echo "Cleaning up lock file..."; rm -f "$LOCK_FILE"' EXIT
# Wait for any currently running auto_updater service to stop
if ${pkgs.systemd}/bin/systemctl is-active --quiet auto_updater.service; then
echo "Waiting for auto_updater service to finish..."
while ${pkgs.systemd}/bin/systemctl is-active --quiet auto_updater.service; do
# Wait for any currently running auto-updater service to stop
if ${pkgs.systemd}/bin/systemctl is-active --quiet auto-updater.service; then
echo "Waiting for auto-updater service to finish..."
while ${pkgs.systemd}/bin/systemctl is-active --quiet auto-updater.service; do
sleep 15
echo "Still waiting for auto_updater to stop..."
echo "Still waiting for auto-updater to stop..."
done
echo "Auto_updater service has stopped."
echo "Auto-updater service has stopped."
fi
if [ -n "$1" ]; then