Skip to content

Commit

Permalink
chore(rpm): stop ovpmd systemd unit when removing
Browse files Browse the repository at this point in the history
Fixes cad#26.
  • Loading branch information
cad committed Aug 22, 2017
1 parent f47e972 commit 08d81ec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -x
set -ex

# deps
rpm --import https://mirror.go-repo.io/fedora/RPM-GPG-KEY-GO-REPO
Expand Down Expand Up @@ -29,4 +29,4 @@ GOOS=linux go build -o $DIR/build/usr/bin/ovpm ./cmd/ovpm
cp $DIR/contrib/systemd/ovpmd.service $DIR/build/$UNITDIR

#package
fpm -s dir -t rpm -n ovpm --version `git name-rev --tags --name-only $(git rev-parse HEAD) | cut -d 'v' -f 2` --iteration 1 --depends openvpn --description "OVPM makes all aspects of OpenVPN server administration a breeze." --after-install $DIR/contrib/afterinstall.sh -p $DIR/rpm -C $DIR/build .
fpm -s dir -t rpm -n ovpm --version `git name-rev --tags --name-only $(git rev-parse HEAD) | cut -d 'v' -f 2` --iteration 1 --depends openvpn --description "OVPM makes all aspects of OpenVPN server administration a breeze." --after-install $DIR/contrib/afterinstall.sh --before-remove $DIR/contrib/beforeremove.sh -p $DIR/rpm -C $DIR/build .
2 changes: 2 additions & 0 deletions contrib/beforeremove.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
systemctl stop ovpmd
systemctl disable ovpmd

0 comments on commit 08d81ec

Please sign in to comment.