ttyd: the service is unavailable after changing the ip address
Open
Nobody has claimed this yet.
stale
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
@feckert @neheb
openwrt master branch
the service is unavailable after changing the ip address
workaround (something like this):
--- ttyd.init
+++ ttyd.init
@@ -44,7 +44,9 @@
[ "$enable" = 0 ] && return 1
[ -z "$command" ] && return 1
+ iface=$interface
[ "${interface::1}" = @ ] && {
+ iface=${interface:1}
interface=$(
. /lib/functions/network.sh
network_get_device device "${interface:1}"
@@ -84,6 +86,9 @@
procd_append_param command $command
procd_set_param stdout 1
procd_set_param stderr 1
+ procd_open_trigger
+ procd_add_interface_trigger "interface.*.up" $iface /etc/init.d/ttyd restart
+ procd_close_trigger
procd_close_instance
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating ttyd.init and reading its interface handling and procd instance setup. Compare the reported workaround with the existing service definition, then verify that changing the configured IP makes ttyd available again and that the service restarts when the relevant interface comes up.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100