Last active
May 29, 2018 02:37
-
-
Save greenbreakfast/59fed49cd58151c6c009b48817feaff8 to your computer and use it in GitHub Desktop.
Example Omega2 /etc/init.d service script
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
#!/bin/sh /etc/rc.common | |
# Copyright (C) 2018 Onion Corporation | |
START=90 | |
USE_PROCD=1 | |
start_service() { | |
procd_open_instance | |
procd_set_param command [YOUR COMMAND HERE] | |
# procd_append_param command [COMMAND ARGUMENTS] # optionally append command parameters | |
procd_set_param respawn # respawn the service if it exits | |
# procd_set_param stdout 1 # forward stdout of the command to logd | |
# procd_set_param stderr 1 # same for stderr | |
procd_close_instance | |
} |
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
#!/bin/sh /etc/rc.common | |
# Copyright (C) 2018 Onion Corporation | |
START=90 | |
USE_PROCD=1 | |
start_service() { | |
procd_open_instance | |
procd_set_param command /root/gpioIrq | |
procd_append_param command 0 # optionally append command parameters - this program takes the GPIO number as an argument | |
procd_set_param respawn # respawn the service if it exits | |
procd_set_param stdout 1 # forward stdout of the command to logd | |
procd_set_param stderr 1 # same for stderr | |
procd_close_instance | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment