Code Monkey home page Code Monkey logo

Comments (11)

angristan avatar angristan commented on July 17, 2024

Something like angristan/openvpn-install#261

from wireguard-install.

liberodark avatar liberodark commented on July 17, 2024

#46 if you want have possibility to make this but have add a good system -install or -remove next is for add more clients

from wireguard-install.

randshell avatar randshell commented on July 17, 2024

Something like angristan/openvpn-install#261

angristan/openvpn-install#592 should be considered too

from wireguard-install.

Leopere avatar Leopere commented on July 17, 2024

It really wouldn't be big trouble to add a function for checking the state of a variable, if the variable.

https://www.cyberciti.biz/faq/unix-linux-bash-script-check-if-variable-is-empty/ that can be fairly easily inserted in near the beginning and then the rest of the script can function basically the same. This way you could use this in headless deployments.

from wireguard-install.

randshell avatar randshell commented on July 17, 2024

It really wouldn't be big trouble to add a function for checking the state of a variable, if the variable.

I can't really work on it until my refactoring PRs are reviewed and eventually merged as they conflict with each other and working on master isn't an option. After if you like you can open a PR for this too, the codebase will be similar to the openvpn-install repo.

from wireguard-install.

Leopere avatar Leopere commented on July 17, 2024

from wireguard-install.

AndreiG6 avatar AndreiG6 commented on July 17, 2024

This is actually way easier than using if's and should not require any major code changes. Ignore everything you see in that cyberciti.biz link. You can simply use bash variable substitution. For example:

$ cat things.sh
echo ${lolwat:-things}
$ bash things.sh 
things
$ 

vs

$ lolwat=omgursh bash things.sh 
omgursh
$ 

from wireguard-install.

Leopere avatar Leopere commented on July 17, 2024

from wireguard-install.

AndreiG6 avatar AndreiG6 commented on July 17, 2024

from wireguard-install.

randshell avatar randshell commented on July 17, 2024

We aren't going to use functions but variable substitution like it was already done in the openvpn-install repo https://github.com/angristan/openvpn-install/blob/eca5be8aacc54a570bb3c5306d8764e1be3cab79/openvpn-install.sh#L603-L605

from wireguard-install.

Leopere avatar Leopere commented on July 17, 2024

from wireguard-install.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.