wireguard-management/README.md
2023-05-01 11:57:20 +03:00

38 lines
1.0 KiB
Markdown

# template-bash
Template repository for projects on bash
* [`script.sh`](https://git.hmp.today/pavel.muhortov/template-bash#script-sh)
____
## `script.sh`
**Description:**
> returning current username if privileged rights are exist
> or
> returning error, if privileged rights are not exist
**Dependencies:**
>
> * [bash](https://www.gnu.org/software/bash/) (tested version 5.1.4 on [Debian GNU/Linux 11](http://ftp.debian.org/debian/dists/bullseye/))
> * [whoami](https://www.gnu.org/software/coreutils/whoami) (tested version 8.30 on [Debian GNU/Linux 11](http://ftp.debian.org/debian/dists/bullseye/))
| POSITION | PARAMETERS | DESCRIPTION | DEFAULT |
|-----------|--------------|------------------------|---------------|
| 1 |**[qn]**|execution without pauses||
| 2 |**[/path/to/conf]**|path to config|`./script.conf`|
Example usage in terminal with bash:
```bash
bash ./script.sh qn ./script.conf
```
Example usage in terminal with make the script executable:
```bash
chmod u+x ./script.sh
script.sh
```