Skip to content

Commit

Permalink
Fix for goconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
mythfish committed Jul 4, 2019
1 parent 4beee04 commit 5e0cb9a
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 28 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ data_import/
*.py[cod]
production.conf
credentialsrc
release/

# C extensions
.#*
Expand Down
53 changes: 38 additions & 15 deletions bindata/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ 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 $VERSION --iteration $RELEASEVER --depends openvpn --description "OVPM makes all aspects of OpenVPN server administration a breeze." --before-install $DIR/contrib/beforeinstall.sh --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 rpm -n ovpm --version $VERSION --iteration $RELEASEVER --depends openvpn --description "OVPM makes all aspects of OpenVPN server administration a breeze." --before-install $DIR/contrib/beforeinstall.sh --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 $VERSION --iteration $RELEASEVER --depends openvpn --description "OVPM makes all aspects of OpenVPN server administration a breeze." --before-install $DIR/contrib/beforeinstall.sh --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
# createrepo --database $RELEASEDIR/rpm

#create deb repo
reprepro -b $RELEASEDIR/deb/ includedeb ovpm $RELEASEDIR/deb/*.deb

# clean
rm -rf $RELEASEDIR/build
# rm -rf $RELEASEDIR/build
echo "packages are ready at ./deb/ and ./rpm/"
6 changes: 6 additions & 0 deletions build_local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

export RELEASEDIR=./release
export DIR=.

./build.sh
3 changes: 2 additions & 1 deletion contrib/afterinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export GROUP="nogroup"
id -u $USER &>/dev/null || useradd $USER
id -g $GROUP &>/dev/null || groupadd $GROUP

systemctl daemon-reload
# Disable systemctl for running in docker
# systemctl daemon-reload
11 changes: 6 additions & 5 deletions contrib/afterupgrade.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash
systemctl daemon-reload
if [ "`systemctl is-active ovpmd`" != "active" ]
then
systemctl restart ovpmd
fi
# Disable systemctl for running in docker
# systemctl daemon-reload
# if [ "`systemctl is-active ovpmd`" != "active" ]
# then
# systemctl restart ovpmd
# fi
5 changes: 3 additions & 2 deletions contrib/beforeremove.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
systemctl stop ovpmd
systemctl disable ovpmd
# Disable systemctl for running in docker
# systemctl stop ovpmd
# systemctl disable ovpmd
4 changes: 3 additions & 1 deletion template/ccd.file.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ifconfig-push {{ .IP }} {{ .NetMask }}
;ifconfig-push {{ .IP }} {{ .NetMask }}

{{if .RedirectGW }}
push "redirect-gateway def1 bypass-dhcp"
Expand All @@ -12,3 +12,5 @@ push "route {{index . 0}} {{index . 1}}"
{{range .Routes}}
push "route {{index . 0}} {{index . 1}} {{index . 2}}"
{{ end }}

iroute 192.168.1.0 255.255.255.0
2 changes: 1 addition & 1 deletion template/server.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ client-to-client
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
# UNCOMMENT THIS LINE OUT.
;duplicate-cn
duplicate-cn

# The keepalive directive causes ping-like
# messages to be sent back and forth over
Expand Down

0 comments on commit 5e0cb9a

Please sign in to comment.