Skip to content

Commit

Permalink
chore: move to uupd as the main name
Browse files Browse the repository at this point in the history
  • Loading branch information
tulilirockz committed Dec 2, 2024
1 parent 364aa86 commit fc81744
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ go.work.sum

# env file
.env
uupd
ublue-upd
output/*
*.key
Expand Down
4 changes: 2 additions & 2 deletions cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion lib/filelock.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion lib/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
2 changes: 1 addition & 1 deletion uupd.service
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Description=Universal Blue Update Oneshot Service

[Service]
Type=oneshot
ExecStart=/usr/bin/ublue-upd -c
ExecStart=/usr/bin/uupd -c

0 comments on commit fc81744

Please sign in to comment.