Discussion:
[gentoo-user] openrc: Writing custom init scripts
(too old to reply)
Thanos Apollo
2023-10-30 06:10:01 UTC
Permalink
Hey, newbie here with a fresh Gentoo install.


I'm setting up mullvad-vpn, using ebuild from GURU, so far so
good. I'd like to have a an init script to start the daemon,
basically like this:

`/etc/init.d/mullvad-daemon`
``` shell
#!/sbin/openrc-run
command=/usr/bin/mullvad-daemon
command_background="yes"
```

running the above script with `doas rc-service mullvad-daemon
start` results in:
`* rc-service: Permission denied` *even as root user/doas/sudo*


As I said, I'm new to openrc. I looked at
<https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Working#Layout>,
am I missing something? Why would this error be produced?
--
Thanos Apollo
https://thanosapollo.com
cal
2023-10-30 06:30:02 UTC
Permalink
Post by Thanos Apollo
Hey, newbie here with a fresh Gentoo install.
I'm setting up mullvad-vpn, using ebuild from GURU, so far so good.  I'd
`/etc/init.d/mullvad-daemon`
``` shell
#!/sbin/openrc-run
command=/usr/bin/mullvad-daemon
command_background="yes"
```
running the above script with `doas rc-service mullvad-daemon start`
`* rc-service: Permission denied` *even as root user/doas/sudo*
As I said, I'm new to openrc.  I looked at
<https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Working#Layout>, am I
missing something?  Why would this error be produced?
Did you chmod +x /etc/init.d/mullvad-daemon? Having the wrong file
permissions can result in permission errors even when using elevated
privileges.
Thanos Apollo
2023-10-30 06:50:01 UTC
Permalink
cal <***@mail.meme.technology> writes:


[...]
Post by cal
Did you chmod +x /etc/init.d/mullvad-daemon? Having the wrong
file
permissions can result in permission errors even when using
elevated
privileges.
Fixed! Thanks, was still viewing it as a conf file & didn't think
of chmod +x
--
Thanos Apollo
https://thanosapollo.com
Loading...