Skip to content

Commit

Permalink
all: imp service uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
EugeneOne1 committed Dec 24, 2021
1 parent 201ef10 commit 583ffc2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions internal/home/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ func handleServiceUninstallCommand(s service.Service) {
if err != nil {
log.Fatalf("service: running init disable: %s", err)
}
} else if err := svcAction(s, "stop"); err != nil {
log.Fatalf("service: executing action %q: %s", "stop", err)
}

if err := svcAction(s, "uninstall"); err != nil {
Expand Down
3 changes: 1 addition & 2 deletions internal/home/service_openbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ import (
//
// TODO(e.burkov): Perhaps, file a PR to github.com/kardianos/service.

// sysVersion is the version of local service.System interface
// implementation.
// sysVersion is the version of local service.System interface implementation.
const sysVersion = "openbsd-runcom"

func chooseSystem() {
Expand Down
2 changes: 1 addition & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ handle_existing() {
"to reinstall/uninstall the AdGuard Home using this script specify one of the '-r' or '-u' flags"
fi

if ( cd "$agh_dir" && ! ./AdGuardHome -s stop || ! ./AdGuardHome -s uninstall )
if ( cd "$agh_dir" && ! ./AdGuardHome -s uninstall )
then
# It doesn't terminate the script since it is possible
# that AGH just not installed as service but appearing
Expand Down

0 comments on commit 583ffc2

Please sign in to comment.