Skip to content

Commit

Permalink
Restart gateway after updating it (deb and rpm) (#130)
Browse files Browse the repository at this point in the history
* add after install script

* remove sudo
  • Loading branch information
t-aleksander authored Oct 23, 2024
1 parent e38bf41 commit 6e58372
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
uses: defGuard/fpm-action@main
with:
fpm_args: "${{ matrix.asset_name }}-${{ github.ref_name }}=/usr/sbin/defguard-gateway defguard-gateway.service=/usr/lib/systemd/system/defguard-gateway.service example-config.toml=/etc/defguard/gateway.toml"
fpm_opts: "--architecture ${{ matrix.arch }} --debug --output-type deb --version ${{ env.VERSION }} --package defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.deb"
fpm_opts: "--architecture ${{ matrix.arch }} --debug --output-type deb --version ${{ env.VERSION }} --package defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.deb --after-install after-install.sh"

- name: Upload DEB
if: matrix.build != 'freebsd'
Expand All @@ -148,7 +148,7 @@ jobs:
uses: defGuard/fpm-action@main
with:
fpm_args: "${{ matrix.asset_name }}-${{ github.ref_name }}=/usr/sbin/defguard-gateway defguard-gateway.service=/usr/lib/systemd/system/defguard-gateway.service example-config.toml=/etc/defguard/gateway.toml"
fpm_opts: "--architecture ${{ matrix.arch }} --debug --output-type rpm --version ${{ env.VERSION }} --package defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.rpm"
fpm_opts: "--architecture ${{ matrix.arch }} --debug --output-type rpm --version ${{ env.VERSION }} --package defguard-gateway_${{ env.VERSION }}_${{ matrix.target }}.rpm --after-install after-install.sh"

- name: Upload RPM
if: matrix.build == 'linux'
Expand Down
3 changes: 3 additions & 0 deletions after-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if systemctl is-enabled defguard-gateway --quiet; then
systemctl restart defguard-gateway
fi

0 comments on commit 6e58372

Please sign in to comment.