diff options
| author | Joe Carstairs <me@joeac.net> | 2026-06-26 14:27:33 +0100 |
|---|---|---|
| committer | Joe Carstairs <me@joeac.net> | 2026-06-29 07:32:35 +0100 |
| commit | b43ea19e1ecdb6e7fe6426d13c75e9ff48f1f0a9 (patch) | |
| tree | 3db46c37cf4c4abd5b52b49e6d7ec565a86d5652 | |
| parent | c6ff40e28894417d87ee7858438f28fc262ffb40 (diff) | |
starts joeac.net services on boot
| -rw-r--r-- | Makefile | 10 | ||||
| -rw-r--r-- | openrc/conf.d/.gitignore | 3 | ||||
| -rw-r--r-- | openrc/conf.d/user.example | 3 | ||||
| -rw-r--r-- | openrc/user-runlevel-default | 6 |
4 files changed, 14 insertions, 8 deletions
@@ -116,7 +116,7 @@ endif $(foreach module,$(MODULES),$(eval $(install_module_rule))) $(foreach module,$(MODULES),$(eval $(uninstall_module_rule))) -~/.config/rc/init.d/joeac.net: openrc/init.d/joeac.net ~/.config/rc/init.d ~/.config/rc/runlevels/default +~/.config/rc/init.d/joeac.net: openrc/init.d/joeac.net ~/.config/rc/init.d ~/.config/rc/runlevels/default /etc/init.d/user.$(shell whoami) /etc/conf.d/user.$(shell whoami) rm -f ~/.config/rc/init.d/joeac.net; \ mkdir -p ~/.config/rc/init.d; \ cp openrc/init.d/joeac.net ~/.config/rc/init.d/joeac.net @@ -126,7 +126,13 @@ $(foreach module,$(MODULES),$(eval $(uninstall_module_rule))) ~/.config/rc/runlevels/default: mkdir -p ~/.config/rc/runlevels/default - @echo "now edit openrc/user-default-runlevel with your username, copy it to /etc/init.d, and add it to the system's default runlevel with \`rc-service add <SERVICE> default\`" + +/etc/init.d/user.$(shell whoami): + sudo ln -s /etc/init.d/user /etc/init.d/user.$(shell whoami) + +/etc/conf.d/user.$(shell whoami): openrc/conf.d/user.$(shell whoami) + sudo cp openrc/conf.d/user.$(shell whoami) /etc/conf.d/user.$(shell whoami) + sudo rc-update add user.$(shell whoami) default .PHONY: uninstall_service uninstall_service: diff --git a/openrc/conf.d/.gitignore b/openrc/conf.d/.gitignore new file mode 100644 index 0000000..de4549a --- /dev/null +++ b/openrc/conf.d/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!user.example diff --git a/openrc/conf.d/user.example b/openrc/conf.d/user.example new file mode 100644 index 0000000..6200354 --- /dev/null +++ b/openrc/conf.d/user.example @@ -0,0 +1,3 @@ +# copy this file to user.<USER> for the user you want to be running joeac.net via OpenRC +# add in here any user setup, bearing in mind that OpenRC doesn't use your usual login flow +# this may include setting up $HOME and/or $XDG_RUNTIME_DIR diff --git a/openrc/user-runlevel-default b/openrc/user-runlevel-default deleted file mode 100644 index 5554db0..0000000 --- a/openrc/user-runlevel-default +++ /dev/null @@ -1,6 +0,0 @@ -#!/sbin/openrc - -description="start <USER> default runlevel" -command="openrc" -command_args="-U default" -command_user="<USER>" |
