diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3b0363aa..87cb9fa7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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' @@ -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' diff --git a/after-install.sh b/after-install.sh new file mode 100755 index 00000000..6524c7d8 --- /dev/null +++ b/after-install.sh @@ -0,0 +1,3 @@ +if systemctl is-enabled defguard-gateway --quiet; then + systemctl restart defguard-gateway +fi