diff --git a/.gitignore b/.gitignore index a84d7db..400277b 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,7 @@ go.work.sum # env file .env +uupd ublue-upd output/* *.key diff --git a/cmd/update.go b/cmd/update.go index 1db768c..c763854 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -20,7 +20,7 @@ type Failure struct { func Update(cmd *cobra.Command, args []string) { lock, err := lib.AcquireLock() if err != nil { - log.Fatalf("%v, is ublue-upd already running?", err) + log.Fatalf("%v, is uupd already running?", err) } systemDriver, err := drv.GetSystemUpdateDriver() if err != nil { @@ -159,7 +159,7 @@ func Update(cmd *cobra.Command, args []string) { failedSystemsList = append(failedSystemsList, systemName) } failedSystemsStr := strings.Join(failedSystemsList, ", ") - lib.Notify("Updates failed", fmt.Sprintf("ublue-upd failed to update: %s, consider seeing logs with `journalctl -exu ublue-upd.service`", failedSystemsStr)) + lib.Notify("Updates failed", fmt.Sprintf("uupd failed to update: %s, consider seeing logs with `journalctl -exu uupd.service`", failedSystemsStr)) log.Printf("Updates Completed with Failures:") for name, fail := range failures { diff --git a/lib/filelock.go b/lib/filelock.go index 5bea876..685d2ba 100644 --- a/lib/filelock.go +++ b/lib/filelock.go @@ -8,7 +8,7 @@ import ( "time" ) -const fileLockPath string = "/run/ublue-upd.lock" +const fileLockPath string = "/run/uupd.lock" func IsFileLocked(file *os.File) bool { lock := syscall.Flock_t{ diff --git a/lib/session.go b/lib/session.go index 3791c83..0268d2e 100644 --- a/lib/session.go +++ b/lib/session.go @@ -77,7 +77,7 @@ func Notify(summary string, body string) error { } for _, user := range users { // we don't care if these exit - RunUID(user.UID, []string{"/usr/bin/notify-send", "--app-name", "ublue-upd", summary, body}, nil) + RunUID(user.UID, []string{"/usr/bin/notify-send", "--app-name", "uupd", summary, body}, nil) } return nil } diff --git a/main.go b/main.go index 98eaaf5..a54f6ba 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,7 @@ func main() { log.Fatalf("Error fetching current user: %v", err) } if currentUser.Uid != "0" { - log.Fatalf("ublue-upd needs to be invoked as root.") + log.Fatalf("uupd needs to be invoked as root.") } cmd.Execute() } diff --git a/uupd.service b/uupd.service index 42027a4..6bbf5a0 100644 --- a/uupd.service +++ b/uupd.service @@ -3,4 +3,4 @@ Description=Universal Blue Update Oneshot Service [Service] Type=oneshot -ExecStart=/usr/bin/ublue-upd -c +ExecStart=/usr/bin/uupd -c