Загрузил(а) файлы в ''

This commit is contained in:
KhomyaK_HTF 2023-04-13 11:41:19 +02:00
parent a153f30f56
commit e9f47566f6
1 changed files with 32 additions and 0 deletions

32
hamachi Normal file
View File

@ -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"
}