Загрузил(а) файлы в ''
This commit is contained in:
parent
a153f30f56
commit
e9f47566f6
|
@ -0,0 +1,32 @@
|
||||||
|
#!/usr/bin/openrc-run
|
||||||
|
#KhomyaK_HTF
|
||||||
|
#Donetsk, 2023
|
||||||
|
#My Discord: "Can't Let Hamster#0947"
|
||||||
|
|
||||||
|
description="Hamachi deamon."
|
||||||
|
depend() {
|
||||||
|
need netmount
|
||||||
|
use NetworkManager
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
yesno "${IN_BACKGROUND}" && return 0
|
||||||
|
|
||||||
|
[ -z "${INACTIVE_TIMEOUT}" ] && INACTIVE_TIMEOUT="1"
|
||||||
|
|
||||||
|
ebegin "Starting Hamachi"
|
||||||
|
start-stop-daemon --start --exec /opt/logmein-hamachi/bin/hamachid
|
||||||
|
local _retval=$?
|
||||||
|
eend "${_retval}"
|
||||||
|
if [ "x${_retval}" = 'x0' ] && ! nm-online -t "${INACTIVE_TIMEOUT}"; then
|
||||||
|
einfo "Marking Hamachi as inactive. It will automatically be marked"
|
||||||
|
einfo "as running before the network connection was established."
|
||||||
|
mark_service_inactive
|
||||||
|
fi
|
||||||
|
return "${_retval}"
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
ebegin "Stopping Hamachi"
|
||||||
|
killall "/opt/logmein-hamachi/bin/hamachid"
|
||||||
|
}
|
Loading…
Reference in New Issue