mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-10-03 15:53:56 +00:00
feat: Linux packaging, SDK v0.7.1, fix rawmode conflict
- go.mod: SDK pseudo-version -> v0.7.1 (remote tag), go.sum updated - cmd/waiter/rawmode_linux.go: remove (conflicts with raw_unix.go) - cmd/gui/package.json: add rpm/AppImage Linux targets - package/package-linux.sh: cross-distro packaging script (deb/tar.gz/rpm) - package/linux/: DEBIAN control files, postinst/prerm, RPM spec
This commit is contained in:
25
package/linux/deb/postinst
Executable file
25
package/linux/deb/postinst
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
SERVICE_NAME="homeagent"
|
||||
SERVICE_FILE="/etc/systemd/system/${SERVICE_NAME}.service"
|
||||
HOMED_BIN="/usr/bin/homed"
|
||||
DATA_DIR="/var/lib/homeagent"
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if [ -f "$HOMED_BIN" ]; then
|
||||
mkdir -p "$DATA_DIR"
|
||||
|
||||
if [ -f "$SERVICE_FILE" ]; then
|
||||
systemctl daemon-reload 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user