Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion net/yate/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=yate
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/yatevoip/yate.git
Expand Down
38 changes: 22 additions & 16 deletions net/yate/files/yate.init
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2013 OpenWrt.org

START=50
USE_PROCD=1

SERVICE_USE_PID=1
# Log verbosity level. An integer from 0 to 5 (5 is maximum logging).
LOG_LEVEL=0

YATE_BINARY="/usr/bin/yate"
YATE_LOG_FILE=""
YATE_OPTIONS="-d -s -p /var/run/yate.pid"
# Log file name. If not specified, then logs go to the system log.
LOG_FILE=""

start() {
if [ -n "$YATE_LOG_FILE" ]; then
YATE_OPTIONS="$YATE_OPTIONS -r -l $YATE_LOG_FILE"
fi
start_service() {
procd_open_instance
procd_set_param command /usr/bin/yate -s

service_start $YATE_BINARY $YATE_OPTIONS
}
for x in $(seq $LOG_LEVEL); do
procd_append_param command -v
done

stop() {
service_stop $YATE_BINARY
}
if [ -n "$LOG_FILE" ]; then
procd_append_param command -DZ -r -l "$LOG_FILE"
else
procd_append_param command -Dn
procd_set_param stdout 1
procd_set_param stderr 1
fi

reload() {
service_reload $YATE_BINARY
procd_set_param pidfile /var/run/yate.pid
procd_set_param term_timeout 30
procd_close_instance
}
Loading