Re: How to test init services?
Reply #7 –
If you build / download a copy of the openrc package then unpack it somewhere then change the shebang of the script to point to this non standard location of openrc-run it might work to some degree at least:
$ tar -xvf openrc-0.44.10-1-x86_64.pkg.tar.zst
new shebang:
#!/tmp/openrc/test/usr/bin/openrc-run
/tmp/openrc/test$ sudo rc-status |ag clamd
clamd [ started ]
/tmp/openrc/test$ sudo ./clamd stop
/tmp/openrc/test$ sudo rc-status |ag clamd
clamd [ stopped ]
I have openrc installed already though, this approach might possibly help you try out some things but I wouldn't really trust any test like this for production use, a VM would be better, as the fs is compressed they don't take up as many resources as you might imagine and you could probably just update the OS in the vm once in a while when it has been installed.