complexorganizations/wireguard-manager

Alpine Linux doesn't work

FireMasterK opened this issue · 1 comments

Describe the bug
The script doesn't run properly on Alpine Linux.

To Reproduce
Steps to reproduce the behavior:

  1. Get Alpine Linux
  2. curl https://raw.githubusercontent.com/complexorganizations/wireguard-manager/main/wireguard-manager.sh --create-dirs -o /usr/local/bin/wireguard-manager.sh
  3. chmod +x /usr/local/bin/wireguard-manager.sh
  4. Install bash since script doesn't work with ash.
  5. wireguard-manager.sh
  6. The cut command fails, and the script fails due to Alpine Linux not using systemd.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
image

Additional context
Add any other context about the problem here.

alpine:~# bash /usr/local/bin/wireguard-manager.sh
cut: unrecognized option: delimiter=.
BusyBox v1.36.1 (2023-11-07 18:53:09 UTC) multi-call binary.

Usage: cut [OPTIONS] [FILE]...

Print selected fields from FILEs to stdout

        -b LIST Output only bytes from LIST
        -c LIST Output only characters from LIST
        -d SEP  Field delimiter for input (default -f TAB, -F run of whitespace)
        -O SEP  Field delimeter for output (default = -d for -f, one space for -F)
        -D      Don't sort/collate sections or match -fF lines without delimeter
        -f LIST Print only these fields (-d is single char)
        -s      Output only lines containing delimiter
        -n      Ignored
fetch http://alpine.mirror.wearetriple.com/v3.19/main/x86_64/APKINDEX.tar.gz
fetch http://alpine.mirror.wearetriple.com/v3.19/community/x86_64/APKINDEX.tar.gz
v3.19.0-327-g6edd0d6d61c [http://alpine.mirror.wearetriple.com/v3.19/main]
v3.19.0-326-gc0d01ae6d7b [http://alpine.mirror.wearetriple.com/v3.19/community]
OK: 22980 distinct packages available
ERROR: unable to select packages:
  ifupdown (no such package):
    required by: world[ifupdown]
  qrencode (no such package):
    required by: world[qrencode]
  systemd (no such package):
    required by: world[systemd]
/usr/local/bin/wireguard-manager.sh: line 117: systemd-detect-virt: command not found
Error: the  virtualization is currently not supported. Please stay tuned for future updates.

with alpine 3.19, it would be nice to actually test if it works on alpine before putting in alpine as supported since it seems like it wasnt checked