mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 17:18:59 +00:00
23 lines
373 B
Plaintext
23 lines
373 B
Plaintext
|
#!/bin/sh /etc/rc.common
|
||
|
# Copyright (c) 2014 OpenWrt.org
|
||
|
|
||
|
START=80
|
||
|
|
||
|
USE_PROCD=1
|
||
|
PROG=/usr/sbin/ugps
|
||
|
|
||
|
service_triggers() {
|
||
|
procd_add_reload_trigger gps
|
||
|
}
|
||
|
|
||
|
start_service() {
|
||
|
local tty="$(uci get gps.@gps[-1].tty)"
|
||
|
|
||
|
[ -d "/sys/class/tty/$tty/" ] || return
|
||
|
|
||
|
procd_open_instance
|
||
|
procd_set_param command "$PROG" "/dev/$tty"
|
||
|
procd_set_param respawn
|
||
|
procd_close_instance
|
||
|
}
|