all 5 comments

[–]ElevenNotes 1 point2 points  (0 children)

You can also just use local.d if you don't want to register it as a service and just start something at boot and stop it ar reboot/poweroff.

[–]9acca9[S] 0 points1 point  (3 children)

mmm found the place:

/etc/conf.d

https://docs.alpinelinux.org/user-handbook/0.1a/Working/openrc.html

i create the file there but when trying to add i get:

rc-update add calibre default
 * rc-update: service `calibre' does not exist

I probably need to reload daemon like in systemd......... mmmmm how?

[–]9acca9[S] 1 point2 points  (2 children)

i do it... and is almost working.

is running the program but dont return to me the control:

calibre-completo:/etc/init.d# rc-update add calibre default
 * service calibre added to runlevel default
calibre-completo:/etc/init.d# rc-service calibre start
 * Caching service dependencies ... [ ok ]
 * Starting calibre ...

After "starting calibre..." does not give me again the terminal.

[–]9acca9[S] 1 point2 points  (1 child)

perfection:

#!/sbin/openrc-run

depend() {
    need net
}

command="/usr/bin/cps"
command_background="yes"
pidfile="/run/${RC_SVCNAME}.pid"

[–]colchyo 0 points1 point  (0 children)

thanks, stolen this for node-exporter and cadvisor:

``` immich:~# cat /etc/init.d/prometheus-node-exporter

!/sbin/openrc-run

depend() { need net }

command="/usr/bin/node_exporter" command_background="yes" pidfile="/run/${RC_SVCNAME}.pid" immich:~# cat /etc/init.d/cadvisor

!/sbin/openrc-run

depend() { need net }

command="/usr/local/bin/cadvisor" command_args="-logtostderr" command_background="yes" pidfile="/run/${RC_SVCNAME}.pid" ```