Compare commits

..

No commits in common. "2371abc9fd6bbf1b542392acc398b1a6aaa3b2c1" and "f50101ac977f08cc9ef7464a41369df67a974111" have entirely different histories.

4 changed files with 3 additions and 22 deletions

View File

@ -15,7 +15,7 @@ GOARM ?=
BUILD_DIR = ./.build BUILD_DIR = ./.build
PKG_DIR = $(BUILD_DIR)/$(ARCH) PKG_DIR = $(BUILD_DIR)/$(ARCH)
BIN_DIR = $(PKG_DIR)/data/opt/bin BIN_DIR = $(PKG_DIR)/data/opt/usr/bin
PARAMS = -v -a -trimpath -ldflags="-X 'kvas2/constant.Version=$(VERSION)' -X 'kvas2/constant.Commit=$(COMMIT)' -w -s" PARAMS = -v -a -trimpath -ldflags="-X 'kvas2/constant.Version=$(VERSION)' -X 'kvas2/constant.Commit=$(COMMIT)' -w -s"
all: build_daemon package all: build_daemon package
@ -31,7 +31,7 @@ package:
@echo 'Architecture: $(ARCH)' >> $(PKG_DIR)/control/control @echo 'Architecture: $(ARCH)' >> $(PKG_DIR)/control/control
@echo 'Maintainer: $(APP_MAINTAINER)' >> $(PKG_DIR)/control/control @echo 'Maintainer: $(APP_MAINTAINER)' >> $(PKG_DIR)/control/control
@echo 'Description: $(APP_DESCRIPTION)' >> $(PKG_DIR)/control/control @echo 'Description: $(APP_DESCRIPTION)' >> $(PKG_DIR)/control/control
@echo 'Section: net' >> $(PKG_DIR)/control/control @echo 'Section: base' >> $(PKG_DIR)/control/control
@echo 'Priority: optional' >> $(PKG_DIR)/control/control @echo 'Priority: optional' >> $(PKG_DIR)/control/control
@echo 'Depends: libc, iptables, socat' >> $(PKG_DIR)/control/control @echo 'Depends: libc, iptables, socat' >> $(PKG_DIR)/control/control
@mkdir -p $(PKG_DIR)/data/opt/usr/bin @mkdir -p $(PKG_DIR)/data/opt/usr/bin

View File

@ -86,15 +86,6 @@ func (g *Group) Disable() []error {
return errs return errs
} }
func (g *Group) Destroy() []error {
errs := g.Disable()
err := g.ipset.Destroy()
if err != nil {
errs = append(errs, err)
}
return errs
}
func (g *Group) Sync(records *records.Records) error { func (g *Group) Sync(records *records.Records) error {
now := time.Now() now := time.Now()

View File

@ -164,7 +164,7 @@ func (a *App) start(ctx context.Context) (err error) {
} }
defer func() { defer func() {
for _, group := range a.Groups { for _, group := range a.Groups {
_ = group.Destroy() _ = group.Disable()
} }
}() }()

View File

@ -1,10 +0,0 @@
#!/bin/sh
ENABLED=yes
PROCS=kvas2d
ARGS=""
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
. /opt/etc/init.d/rc.func