-
-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OpenWRT procd service script (#251)
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh /etc/rc.common | ||
|
||
# Put this script at /etc/init.d/godns | ||
# To start: `service godns start` | ||
# To enable (i.e. auto-start on boot): `service godns enable` | ||
|
||
USE_PROCD=1 | ||
START=98 | ||
PROG="/path/to/your/godns-dir/godns" | ||
CONF="/path/to/your/godns-dir/config.json" | ||
|
||
start_service() { | ||
procd_open_instance | ||
procd_set_param command "$PROG" | ||
procd_append_param command -c="$CONF" | ||
#procd_set_param stdout 1 # if enabled, log will go into syslog | ||
procd_set_param stderr 1 | ||
procd_set_param respawn 600 10 10 | ||
procd_close_instance | ||
} | ||
|