pivpn/files/etc/init.d/wg-quick

24 lines
580 B
Text
Raw Normal View History

2022-07-26 13:20:35 +00:00
#!/sbin/openrc-run
#################################################################################
# Filename: files/etc/init.d/wg-quick #
# Purpose: OpenRC service that starts WireGuard #
# Authors: Giulio Coa <34110430+giulioc008@users.noreply.github.com> #
# License: This file is licensed under the MIT. #
#################################################################################
description="WireGuard - Quick version"
depend() {
need localmount
need net
}
start() {
wg-quick up wg0
}
stop() {
wg-quick down wg0
}