wireguard-ui icon indicating copy to clipboard operation
wireguard-ui copied to clipboard

improve doc add systemd unit to start UI

Open AttilioGreco opened this issue 2 years ago • 2 comments

AttilioGreco avatar Nov 09 '23 16:11 AttilioGreco

Good work!

Took you ideas for AUR package with some modifications:

# https://wiki.archlinux.org/title/Users_and_groups#Example_adding_a_system_user
useradd -r -U -s /usr/bin/nologin -m -d /var/lib/wireguard-ui wireguard-ui
# Need check folder on exist first
[ ! -f "/etc/wireguard/wg0.conf" ] && { mkdir -p /etc/wireguard/; touch /etc/wireguard/wg0.conf; }

And

[Unit]
Description=A web user interface to manage your WireGuard setup
Documentation=https://github.com/ngoduykhanh/wireguard-ui

...

EnvironmentFile=-/etc/wireguard-ui/environment.conf 
ExecStart=/usr/bin/wireguard-ui

Making environment.conf file not always needed so it is with -

nebulosa2007 avatar Nov 10 '23 11:11 nebulosa2007

These changes would be much better if they used heredocs. See how that's done in the README and implement those here too.

systemcrash avatar Dec 03 '23 00:12 systemcrash