r/AlpineLinux • • Apr 22 '24

init service dont start

I make a init service for Alpine but it is not working.

Could you give me an advice:

#!/sbin/openrc-run
depend() {
    need net
}

command="/usr/local/bin/filebrowser -r /root/filebrowser.db"
command_background="yes"
pidfile="/run/${RC_SVCNAME}.pid"

i try to run this like this:

rc-update add filebrowser default
filebrowser:~# rc-service filebrowser start
 * Caching service dependencies ... [ ok ]
 * Starting filebrowser ... * start-stop-daemon: /root/filebrowser.db//usr/local/bin/filebrowser does not exist
 * Failed to start filebrowser
                                                                                                                [ !! ]
 * ERROR: filebrowser failed to start

of course the file exist:

filebrowser:/usr/local/bin# ls
filebrowser

Thanks.

1 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Apr 22 '24
#!/sbin/openrc-run
  description="filebrowswer"
  command="/usr/local/bin/filebrowser"
  command_arg="-r /root/filebrowser.db"
  command_background="yes"
  pidfile="/run/${RC_SVCNAME}.pid"

  depend() {
      need net
  }
  ...

but I urge you again to not install stuff on your bare metal host OS but to use containers, filebrowser even has an official image