2023-12-30 20:23:30 +00:00
|
|
|
#!/sbin/openrc-run
|
|
|
|
name="inet2"
|
|
|
|
description="Sets up wireguard interfaces connected via the host's internet connection"
|
|
|
|
|
|
|
|
extra_started_commands="reloadwg"
|
|
|
|
|
2024-11-17 04:01:08 +00:00
|
|
|
export INET2_PREFIX=/usr/local
|
|
|
|
|
2023-12-30 20:23:30 +00:00
|
|
|
start() {
|
2024-11-17 04:01:08 +00:00
|
|
|
${INET2_PREFIX}/bin/inet2.sh start
|
2023-12-30 20:23:30 +00:00
|
|
|
rc-service bird start 2> /dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2024-11-17 04:01:08 +00:00
|
|
|
${INET2_PREFIX}/bin/inet2.sh stop
|
2023-12-30 20:23:30 +00:00
|
|
|
rc-service bird stop 2> /dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
restart() {
|
|
|
|
stop
|
|
|
|
start
|
|
|
|
}
|
|
|
|
|
|
|
|
reload() {
|
2024-11-17 04:01:08 +00:00
|
|
|
${INET2_PREFIX}/bin/inet2.sh reload
|
2023-12-30 20:23:30 +00:00
|
|
|
rc-service bird restart 2> /dev/null
|
|
|
|
}
|
|
|
|
|