Created
April 25, 2021 15:20
-
-
Save denghongcai/97baf95d13446fbdd0671bcf007fadff to your computer and use it in GitHub Desktop.
overture openwrt service
This file contains hidden or 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
#!/bin/sh /etc/rc.common | |
USE_PROCD=1 | |
START=99 | |
overture_start() { | |
procd_open_instance overture-$1 | |
procd_set_param command /etc/overture/overture-linux-amd64 -c /etc/overture/config.yml | |
procd_set_param pidfile /var/run/overture/overture-$1.pid | |
procd_set_param respawn | |
procd_set_param stdout 1 | |
procd_set_param stderr 1 | |
procd_close_instance | |
} | |
# ===== Begin of PROCD part ===== # | |
start_service() { | |
mkdir /var/run/overture | |
overture_start overture | |
} | |
stop_service() { | |
rm -r /var/run/overture | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://openwrt.org/docs/guide-developer/procd-init-scripts