mirror of
https://github.com/pivpn/pivpn.git
synced 2025-04-25 08:40:10 +00:00
Enable cloneandupdate() function, fixed detecting existing iptables rules.
- Uncommented lines inside the cloneandupdate() function in the update script, so pivpn -up can pull scripts from the master branch - The script was checking for the existence of PiVPN rules in the INPUT and FORWARD chain by passing 'iptables -t nat -S' to grep, but it couldn't find them as they belong to the filer table and not the nat table. The correct command is 'iptables -S'
This commit is contained in:
parent
5bfaa95e9f
commit
30b374054c
2 changed files with 6 additions and 12 deletions
|
@ -50,16 +50,10 @@ updatefromtest(){
|
|||
|
||||
##Clone and copy pivpn scripts to /opt/pivpn
|
||||
cloneandupdate(){
|
||||
##This is to be removed after merge.
|
||||
##Alert for users trying to update from master.
|
||||
echo "ERROR: You have installed pivpn from test branch."
|
||||
echo "Wireguard not yet available on master, please use -t flag"
|
||||
exit 1
|
||||
## Remove Above and uncomment below when test is moved to master
|
||||
# git clone "$pivpnrepo" "$pivpnlocalpath"
|
||||
# cp "${pivpnlocalpath}"/scripts/*.sh "$pivpnscripts"
|
||||
# cp "${pivpnlocalpath}"/scripts/$VPN/*.sh "$pivpnscripts"
|
||||
# cp "${pivpnlocalpath}"/scripts/$VPN/bash-completion "$bashcompletiondir"
|
||||
git clone "$pivpnrepo" "$pivpnlocalpath"
|
||||
cp "${pivpnlocalpath}"/scripts/*.sh "$pivpnscripts"
|
||||
cp "${pivpnlocalpath}"/scripts/$VPN/*.sh "$pivpnscripts"
|
||||
cp "${pivpnlocalpath}"/scripts/$VPN/bash-completion "$bashcompletiondir"
|
||||
}
|
||||
|
||||
##same as cloneandupdate() but from test branch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue