I have cross-compiled it.
btw it is not those famous reverse proxy sniproxies that are for multi-domain hosting.
it is this package
also about your suggestion:
in logead I see the Wed Jan 25 13:10:40 2023 user.notice root: started sniproxy
so I see that the script is run but maybe because it is not a daemon I should run it in screen ?
UPDATE:
raising to 99 worked.
thank you.
should I use 99 for all my custom apps that usually only works after whole device dont its startup stuff?
I think I have to go PROCD for the failover-restart.
can you put a sample for that ?
the included init.d in openwrt are too complicated for me to learn from.
It would have a ton of stuff you won't need for your script, there are probably smaller/easier to read PROCD scripts, maybe someone else will chime in on that.
However it's a good example if there could be multiple instances of your service and shows you how to pull variables from config file and also has an example of adding firewall objects if you need to manipulate firewall settings from the init script.
Use htop to see if the service is running, logread -e sniproxy
Just a bit of reference going forward. This pretty well sums up the documentation.
Summary
~/lib/functions# cat procd.sh
# procd API:
#
# procd_open_service(name, [script]):
# Initialize a new procd command message containing a service with one or more instances
#
# procd_close_service()
# Send the command message for the service
#
# procd_open_instance([name]):
# Add an instance to the service described by the previous procd_open_service call
#
# procd_set_param(type, [value...])
# Available types:
# command: command line (array).
# respawn info: array with 3 values $fail_threshold $restart_timeout $max_fail
# env: environment variable (passed to the process)
# data: arbitrary name/value pairs for detecting config changes (table)
# file: configuration files (array)
# netdev: bound network device (detects ifindex changes)
# limits: resource limits (passed to the process)
# user: $username to run service as
# group: $groupname to run service as
# pidfile: file name to write pid into
# stdout: boolean whether to redirect commands stdout to syslog (default: 0)
# stderr: boolean whether to redirect commands stderr to syslog (default: 0)
# facility: syslog facility used when logging to syslog (default: daemon)
#
# No space separation is done for arrays/tables - use one function argument per command line argument
#
# procd_close_instance():
# Complete the instance being prepared
#
# procd_running(service, [instance]):
# Checks if service/instance is currently running
#
# procd_kill(service, [instance]):
# Kill a service instance (or all instances)
#
# procd_send_signal(service, [instance], [signal])
# Send a signal to a service instance (or all instances)
#
I already have the service running.
but I saw that it was nor running after some hours, so I wanted to be sure I didnt have to manually restart the script.
I understand that.
thank you for the answer.
I was hoping for someone to write me a script
I try to write one to see what happens and also try not to be a lazy boy.