mirror of
https://github.com/AuxXxilium/synology-wireguard.git
synced 2024-11-23 15:01:05 +07:00
19 lines
364 B
Bash
Executable File
19 lines
364 B
Bash
Executable File
#!/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
|