Hello,

Is it possible to turn on/turn off, for example, "ufw" as a service/daemon permanently and how to do it?

in openrc I use:
sudo rc-update (add, del) ufw
in (sorry) systemd:
sudo systemctl (enable, disable) ufw.service
How can I do it using s6 suite?
depending of the service used :
for s6-rc service
# s6opts update ufw
this command will disable ufw service if it already enabled, or it will enable ufw service if it not enabled.
for classic service
# s6opts disable ufw
Also, be aware about the permissions of the service. If the service is launched with user permissions, the above command need to be made as normal, not with root privilegies.
Refer to the wiki : https://wiki.obarun.org/doku.php?id=s6opts.

If it's not clear, do not hesitate to ask again :)

Trick: if you use zsh, do not forget to use the completion, s6opts come with it. Very very userfull to find service, to find command available, and so on..
Thank You :)

I learned that you need to switch to different live database than Default if you want to turn on a service, for example "ufw".
Is it possible to compile a new live database from Default database as a source, for example:
sudo s6opts compile User_Obarun Default
and then
sudo s6opts switch User_Obarun
to make a new one (User_Obarun), which would be a good start to operate with my own services (for example "ufw")

If my thinking is not proper, please, give me a hand - how to make a new database, which would be a base for turning on new serivces (for example "ufw") and is it possible to make it from Default database.

What's my point? - I would like to make "ufw" work as a service in a different database than Default. What steps (commands) should I make in s6 to do it so.
to build your own database
first build the source
# s6opts add User_Obarun_source ufw
this command will add the service ufw on a database source called User_Obarun_source.
Now compile it
# s6opts compile User_Obarun_compiled User_Obarun_source
this command will compile a database called User_Obarun_compiled with the source called User_Obarun_source.

Finally to use it, switch on it
# s6opts switch User_Obarun_compiled
VoilĂ !

Now you use a different database that Default, you can update directly your own database by doing :
# s6opts update my_new_service
this command will make automaticaly the creation of the source and the compilation part :).
to remove the service from it
# s6opts update my_new_service
this will remove the service my_new_service because it's already in use. to enable it again
# s6opts update my_new_service
and so on.....
Do I have to create a ufw service first if I have to go with all the steps you posted?
For example
# s6opts create
and to go further with questions asked by the program

Why do I ask? :)
in the first step you wrote
# s6opts add User_Obarun_source ufw
the system is giving me a feedback:
:: ufw doesn't exist, try use another name
btw: thank you for your patience Eric
btw 2: There is something wrong with https://skarnet.org, I can't connect with the server
@ There is something wrong with https://skarnet.org, I can't connect with the server
Yep, trouble with the server, laurent is currently working on it, he warmed us on the chat. It can take time because the trouble do not come from him but the hosting itself
in the first step you wrote

# s6opts add User_Obarun_source ufw

the system is giving me a feedback:
it was an example, you need to create first your service for sure and not we do not have for the moment an ufw service, you need to make it, but please, if you do something useful, share it :).
Thank you
And I will share, for sure

:)

Powered by Obarun