Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: move to uupd as the main name #2

Merged
merged 1 commit into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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