If somehow your trees get deleted, to build boot and default trees from scratch, first set
EDITOR to your favorite text editor. (Example:
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).
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:
Modified init scripts, to avoid being overwritten by pkg updates, should be placed in:
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
First decide which tree or newly created tree the service will go in, for this example we are using the newly created default tree.
66-enable -t default sshd
66-disable -t default sshd
Same tree using in this example: default
66-start -t default sshd
66-stop -t default sshd
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]
As in the other examples, we're using the default tree.
66-intree -go contents default
66-inservice -t default sshd
User services are placed in:
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
A note about going to another init and back to 66. Make sure all service files from previous tree still exists and run
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
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.