From 9a5dc2aeb42e52090c0e0a9f127b873bbb288465 Mon Sep 17 00:00:00 2001 From: Mustafa Arici Date: Sat, 2 Sep 2017 14:39:58 +0300 Subject: [PATCH] chore(ci): afterupgrade script --- build.sh | 4 ++-- contrib/afterupgrade.sh | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 contrib/afterupgrade.sh diff --git a/build.sh b/build.sh index 5ddb110..1a04ef0 100755 --- a/build.sh +++ b/build.sh @@ -41,9 +41,9 @@ cp $DIR/contrib/yumrepo.repo $RELEASEDIR/rpm/ovpm.repo cp $DIR/contrib/deb-repo-config $RELEASEDIR/deb/conf/distributions #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 $RELEASEVER --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 $RELEASEDIR/rpm -C $RELEASEDIR/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 $RELEASEVER --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 --after-upgrade $DIR/contrib/afterupgrade.sh -p $RELEASEDIR/rpm -C $RELEASEDIR/build . -fpm -s dir -t deb -n ovpm --version `git name-rev --tags --name-only $(git rev-parse HEAD) | cut -d 'v' -f 2` --iteration $RELEASEVER --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 $RELEASEDIR/deb -C $RELEASEDIR/build . +fpm -s dir -t deb -n ovpm --version `git name-rev --tags --name-only $(git rev-parse HEAD) | cut -d 'v' -f 2` --iteration $RELEASEVER --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 --after-upgrade $DIR/contrib/afterupgrade.sh -p $RELEASEDIR/deb -C $RELEASEDIR/build . #create rpm repo createrepo --database $RELEASEDIR/rpm diff --git a/contrib/afterupgrade.sh b/contrib/afterupgrade.sh new file mode 100644 index 0000000..46b4487 --- /dev/null +++ b/contrib/afterupgrade.sh @@ -0,0 +1,4 @@ +if [ "`systemctl is-active ovpmd`" != "active" ] +then + systemctl restart ovpmd +fi