Skip to content

Commit f30ff86

Browse files
committed
added postinstall script
1 parent a1aaaf7 commit f30ff86

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

goreleaser.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ nfpms:
5656
license: GNU GPLv3
5757
formats:
5858
- deb
59+
scripts:
60+
postinstall: postinstall.sh
5961
bindir: /usr/local/bin
6062
contents:
6163
- src: ./yang

nfpm.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ maintainer: "Roman Dodin <[email protected]>"
55
description: "Greeter NDK application" # description of a package
66
vendor: "Nokia" # optional information about the creator of the package
77
license: "Apache-2.0" # license of the package
8+
scripts:
9+
postinstall: postinstall.sh # post-installation script that can, for example, reload app_mgr
810
contents: # contents to add to the package
911
- src: "./build/greeter" # local path of agent binary
1012
dst: "/usr/local/bin/greeter" # destination path of agent binary

postinstall.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
set +e
3+
4+
source /etc/profile.d/sr_app_env.sh
5+
6+
echo "Reload appmgr"
7+
sr_cli -e "/ tools system app-management application app_mgr reload" > /dev/null 2>&1 || true
8+
sleep 1

0 commit comments

Comments
 (0)