Skip to content

Instantly share code, notes, and snippets.

@denghongcai
Created April 25, 2021 15:20
Show Gist options
  • Save denghongcai/97baf95d13446fbdd0671bcf007fadff to your computer and use it in GitHub Desktop.
Save denghongcai/97baf95d13446fbdd0671bcf007fadff to your computer and use it in GitHub Desktop.
overture openwrt service
#!/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
}
@denghongcai
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment