Suite66

TL;DR

If somehow your trees get deleted, to build boot and default trees from scratch, first set EDITOR to your favorite text editor. (Example: /bin/vi.) Then:

  export EDITOR=/bin/vi
  66-env -t boot [email protected]
  66-enable -t boot -F [email protected]
  66-tree -ncE default
  66-enable -t default acpid dhcpcd dbus logind syslog-ng    # add your desired services here
  66-all -t default up

The above method can be used to recreate them (for example, from a live ISO chroot).

Basics

This guide will be more of a crash course than an in depth guide on basic usage of 66.

The service directories for init scripts are located:

  /etc/66/service

Modified init scripts, to avoid being overwritten by pkg updates, should be placed in:

 /etc/suite66/service

Tree or in s6 terms, bundle, creation.

If, lets say, you wanted to create a tree named audio for your audio services

  66-tree -n audio

Another example: If one wanted to create another tree that you may want to run upon next reboot, but not your current default

  66-tree -ncE slim-tree

Now lets explain what the option flags are:

 -n : new 
 -c is to set tree as current
 -E is to enable

At anytime you can enable/disable/remove a tree with

  66-tree OPTIONS TREE_NAME
  -E: Enable
  -D: Disable
  -R: Remove

Enable/Disable service(s)

First decide which tree or newly created tree the service will go in, for this example we are using the newly created default tree.

Enable service in tree: default

  66-enable -t default sshd

Disable service in tree: default

  66-disable -t default sshd

Start/Stop service(s)

Same tree using in this example: default

Start

  66-start -t default sshd

Stop

  66-stop -t default sshd
  • Note: In order to start a service, it first my be enabled in a tree and started from that tree.

66's boot config/boot-services are edited using:

  66-env -t boot -e $EDITOR [email protected]

This allows one to change timezone, console font, services, hostname and etc started during boot process,etc. If the config is changed the config must be activated using:

  66-enable -t boot -F [email protected]
  • Do be careful of editing.

Checking service status

As in the other examples, we're using the default tree.

Checking status of all services in a tree

 66-intree -go contents default
  • Before each service name, it shows its PID or status (PID = 0 → not running).

Checking status of an individual service

 66-inservice -t default sshd

User services

User services are placed in:

  $HOME/.66/service

66's user services are useful for services that does not need root privileges and prefer to run as a user. To be able to use this feature first install the scandir-66 package

  pacman -S scandir-66

In order for user(s) to be able to run their services, the admin must enable scandir for the user's service directory. For this example, user's username is artix. The following must be run as root:

  66-enable -t TREE_NAME [email protected]
  66-start -t TREE_NAME [email protected]

Now a user can place their service files in $HOME/.66/service and run as a regular user:

  66-tree -cnE TREE_NAME
  66-enable -t TREE_NAME service
  66-start -t TREE_NAME service

Switching inits

A note about going to another init and back to 66. Make sure all service files from previous tree still exists and run

  66-update

or you can delete the default tree: (The following three steps are only needed if you want or need to recreate the default tree)

  66-tree -RD default

and create the default tree again.

  66-tree -ncE default

Last step is to enable services you want to run in the default tree

  66-enable SERVICE(s)

Notes

If a service during boot crashes and causes tty to not show, tty12 should be available for diagnostic purposes and allow service(s) to be fixed.

Additional information

  1. https://web.obarun.org/software/66/latest/
  2. https://web.obarun.org/software/66-tools/