Skip to content

Commit

Permalink
added postinstall script
Browse files Browse the repository at this point in the history
  • Loading branch information
hellt committed Sep 18, 2024
1 parent a1aaaf7 commit f30ff86
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ nfpms:
license: GNU GPLv3
formats:
- deb
scripts:
postinstall: postinstall.sh
bindir: /usr/local/bin
contents:
- src: ./yang
Expand Down
2 changes: 2 additions & 0 deletions nfpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ maintainer: "Roman Dodin <[email protected]>"
description: "Greeter NDK application" # description of a package
vendor: "Nokia" # optional information about the creator of the package
license: "Apache-2.0" # license of the package
scripts:
postinstall: postinstall.sh # post-installation script that can, for example, reload app_mgr
contents: # contents to add to the package
- src: "./build/greeter" # local path of agent binary
dst: "/usr/local/bin/greeter" # destination path of agent binary
Expand Down
8 changes: 8 additions & 0 deletions postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
set +e

source /etc/profile.d/sr_app_env.sh

echo "Reload appmgr"
sr_cli -e "/ tools system app-management application app_mgr reload" > /dev/null 2>&1 || true
sleep 1

0 comments on commit f30ff86

Please sign in to comment.