#!/bin/sh if [ "$EUID" -ne 0 ]; then echo "This script must be run as root" exit 1 fi dir=`dirname $0` sed -i 's/package/root/' "$dir/../conf/privilege" synopkg start WireGuard > /dev/null if [ "$?" -eq 0 ]; then echo "WireGuard has been successfully started" exit 0 else echo "An error occurred during WireGuard startup" 1>&2 exit 1 fi