27 lines
1.0 KiB
Diff
27 lines
1.0 KiB
Diff
diff --recursive --unified nextdns-1.39.4-clean/host/service/runit/service.go nextdns-1.39.4/host/service/runit/service.go
|
|
--- nextdns-1.39.4-clean/host/service/runit/service.go 2023-04-14 00:46:58.232616533 -0400
|
|
+++ nextdns-1.39.4/host/service/runit/service.go 2023-04-14 01:12:43.931927878 -0400
|
|
@@ -31,20 +31,14 @@
|
|
}
|
|
|
|
func (s Service) Install() error {
|
|
- if err := internal.CreateWithTemplate(s.Path, tmpl, 0755, s.Config); err != nil {
|
|
- return err
|
|
- }
|
|
- if err := os.Symlink(strings.TrimSuffix(s.Path, "/run"), "/etc/runit/runsvdir/current/"+s.Config.Name); err != nil {
|
|
+ if err := os.Symlink(strings.TrimSuffix(s.Path, "/run"), "/var/service/"+s.Config.Name); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (s Service) Uninstall() error {
|
|
- if err := os.RemoveAll("/etc/runit/runsvdir/current/" + s.Config.Name); err != nil {
|
|
- return err
|
|
- }
|
|
- if err := os.RemoveAll(strings.TrimSuffix(s.Path, "/run")); err != nil {
|
|
+ if err := os.RemoveAll("/var/service/" + s.Config.Name); err != nil {
|
|
return err
|
|
}
|
|
return nil
|