fix: use try-restart in postinst so .deb upgrade reloads the service
- Bump VERSION 0.1.6 -> 0.1.7 - Change systemctl start -> try-restart in postinst script so that upgrading the package actually restarts nasctl with the new binary
This commit is contained in:
@@ -185,3 +185,4 @@ dist/*.deb
|
|||||||
web/node_modules/
|
web/node_modules/
|
||||||
web/.tsbuild/
|
web/.tsbuild/
|
||||||
|
|
||||||
|
web/.tsbuild/
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
BINARY=nasctl
|
BINARY=nasctl
|
||||||
VERSION?=0.1.6
|
VERSION?=0.1.7
|
||||||
GO?=go
|
GO?=go
|
||||||
LDFLAGS=-s -w -X github.com/darroyo/nasctl/internal/web.Version=$(VERSION) -X github.com/darroyo/nasctl/internal/web.Commit=$(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
LDFLAGS=-s -w -X github.com/darroyo/nasctl/internal/web.Version=$(VERSION) -X github.com/darroyo/nasctl/internal/web.Commit=$(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
|
||||||
BUILD_FLAGS=CGO_ENABLED=0
|
BUILD_FLAGS=CGO_ENABLED=0
|
||||||
@@ -32,7 +32,7 @@ package: build-all
|
|||||||
cp bin/$(BINARY)-linux-amd64 dist/deb/usr/local/bin/$(BINARY)
|
cp bin/$(BINARY)-linux-amd64 dist/deb/usr/local/bin/$(BINARY)
|
||||||
cp systemd/nasctl.service dist/deb/etc/systemd/system/$(BINARY).service
|
cp systemd/nasctl.service dist/deb/etc/systemd/system/$(BINARY).service
|
||||||
printf 'Package: nasctl\nVersion: $(VERSION)\nSection: utils\nPriority: optional\nArchitecture: amd64\nMaintainer: nasctl\nDescription: Monolithic NAS control plane\n' > dist/deb/DEBIAN/control
|
printf 'Package: nasctl\nVersion: $(VERSION)\nSection: utils\nPriority: optional\nArchitecture: amd64\nMaintainer: nasctl\nDescription: Monolithic NAS control plane\n' > dist/deb/DEBIAN/control
|
||||||
printf '#!/bin/sh\nset -e\ninstall -d /var/lib/nasctl\nsystemctl daemon-reload\nsystemctl enable nasctl.service || true\nsystemctl start nasctl.service\n' > dist/deb/DEBIAN/postinst
|
printf '#!/bin/sh\nset -e\ninstall -d /var/lib/nasctl\nsystemctl daemon-reload\nsystemctl enable nasctl.service || true\nsystemctl try-restart nasctl.service\n' > dist/deb/DEBIAN/postinst
|
||||||
chmod 0755 dist/deb/DEBIAN/postinst
|
chmod 0755 dist/deb/DEBIAN/postinst
|
||||||
dpkg-deb --build dist/deb dist/nasctl_$(VERSION)_amd64.deb
|
dpkg-deb --build dist/deb dist/nasctl_$(VERSION)_amd64.deb
|
||||||
|
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
{"root":["./src/app.tsx","./src/dirtycontext.tsx","./src/api.ts","./src/main.tsx","./src/components/dirtybanner.tsx","./src/components/layout.tsx","./src/components/modal.tsx","./src/pages/dashboard.tsx","./src/pages/log.tsx","./src/pages/login.tsx","./src/pages/nfs.tsx","./src/pages/samba.tsx","./src/pages/settings.tsx","./src/pages/users.tsx"],"version":"5.9.3"}
|
|
||||||
Reference in New Issue
Block a user