Skip to content

Commit

Permalink
[CPCLOUD-4591] Build debian package
Browse files Browse the repository at this point in the history
  • Loading branch information
skafandri committed Oct 30, 2024
1 parent 5909f25 commit 1ce7ff3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
- name: Copy source files
run: mkdir -p packager/debian/usr/bin; cp -r agent360 packager/debian/usr/bin/agent360
- name: Build debian package
run: dpkg-deb --build packager/debian agent360-${{ github.ref_name }}.deb
run: dpkg-deb --build packager/debian agent360-${{ GITHUB_SHA }}.deb
- name: Install debian package
run: dpkg -i agent360-${{ github.ref_name }}.deb
run: dpkg -i agent360-${{ github.ref }}.deb
- uses: actions/upload-artifact@v4
with:
name: debian package
Expand Down
18 changes: 0 additions & 18 deletions packager/debian/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
#!/bin/sh -e

. /usr/share/debconf/confmodule

TOKEN=/etc/agent360-token.ini

db_get agent360/user
[ -n "$RET" ] && USERID="$RET"


if [ -n "$USERID" ]; then
agent360 hello $USERID /etc/agent360-token.ini
else
echo 'Generic "hello" is not implemented'
fi

if which pycompile >/dev/null 2>&1; then
pycompile -p agent360
fi

if [ "$(grep -c '^agent360:' /etc/passwd)" = "0" ]; then
echo "Creating user and group agent360"
addgroup --quiet --system agent360 && adduser --quiet --system --disabled-password --no-create-home --gecos "agent360 daemon" --group agent360
Expand Down

0 comments on commit 1ce7ff3

Please sign in to comment.