Skip to content

Openwrt procd daemon script #52

@Septrum101

Description

@Septrum101
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=95
STOP=01

start_service() {
    procd_open_instance
    procd_set_param command fakehttp -d -i eth1 -h cloud.189.cn
    procd_close_instance
}

stop_service() {
    fakehttp -k
}

restart_service() {
    stop
    start
}

usage:

  1. mv fakehttp to /usr/bin
  2. create a file named fakehttp on /etc/init.d, and chmod +x fakehttp
  3. active the script /etc/init.d/fakehttp enable
  4. start the service /etc/init.d/fakehttp start

ps:
you can check the service start success on top

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions