You are not logged in.
sudo should not be used on init scripts, not directly because of security, but it is assumed not every system may had sudo installed as a minimal install with a root account and password will only have su and require running su to change into the root account to perform all administrative tasks.
that aside in a proper initscript the variable RUN_AS_USER is defined, usually as RUN_AS_USER=root for daemons intended to be ran by the root user, for daemons that need to be ran under a specific user the variable is defined with the intended user.
accordingly the start-stop-daemon program will be used to guarantee correct behaviour, ie check for initialization of instance and creation of the pid file.
an example standar use of start-stop-daemon would be as follows:
start-stop-daemon -S --pidfile ${PIDFILE} --make-pidfile --background \
--chuid ${RUN_AS_USER} --startas ${DAEMON} -- ${DAEMON_ARGS}as for the options straight from the manual:
-S, --start [--] arguments
Check for the existence of a specified process. If such a process exists, start-stop-daemon does nothing, and exits with error status 1 (0 if --oknodo is specified). If such a process does not exist, it
starts an instance, using either the executable specified by --exec or, if specified, by --startas. Any arguments given after -- on the command line are passed unmodified to the program being started.the flags and the vars passed should be descriptive enough and those are expected to be defined earlier on the initscript.
as for --background it is used with prgrams that will not fork to background by themselves.
if you want an okay example of a proper initscript file for an arbitrary daemon check https://github.com/eylles/afreq.sh
the file acpufreq.is is the definition of the initscrip, mind you that when you write initscript files not every daemon will support options like reloading the configuration so the route that many initscripts take is to just have the restart idiom also match reload and force-reload like so:
restart|reload|force-reload)
$0 stop && sleep 3 && $0 start
;;sytemd makes everything easier
took a look at the pipewire setup, left a suggestion in an issue.
honestly as sad as it may seem the devuan forum is not a good place to get feedback on software you are writing on principle of barely getting feedback for one reason or another.
fun, my current solution was to not even bother with daemon but instead write a whole program to do management of user level services independient of any init...
tho i need to work on it.
https://github.com/eylles/shed
i do not use a desktop environment so instead of a regular autostart i use this program, there is a lot more that i need to do since i know next to nothing about some stuff and shed is written off my limited understanding of how sysvinit works.
thanks to shed all i need to have these 3 simple files:
pipewire:
NAME=pipewire
EXEC=/usr/bin/pipewirepipewire-pulse:
NAME=pipewire-pulse
EXEC=/usr/bin/pipewire-pulsewireplumber:
NAME=wireplumber
EXEC=/usr/bin/wireplumberand shed will do the rest, i can restart any individual binary if needed or all 3.
in march i had to move from devuan unstable to testing because the t64 migration wasn't kind to my system and i needed some extra time running as i was, i really want to avoid a re-install but seems like that is what i will have to do.
fun enough, systemd does link xz-utils so machines running systemd with xz-utils 5.6.0 are extra compromised with an init level backdoor...
weird i installed usrmerge back in at least march and everything works, then again i'm on ceres so maybe the usrmerge is more "volatile" on stable but still nothing has broke, as for the argument about uptimes it ain't weird when i clock about 70 days of uptime, the only thing that i've ever noticed not working is the plugin scripts of krita but i never tried using them before the usrmerge so as far as i'm concerned krita on debian is slightly broken and may as well have been forever broken.
amazing, i wonder if those posts weren't written by some troll with chatgpt, cuz i mean even the formatting and corporatese of the language and wall of text used to say nothing other than "linux communities bad" and "devuan should be good, but it not good, thus it bad" is not what anyone would expect form a real human bean even if trying to express frustration.
speaking of themes, i've been playing with adw-gtk3 and how configurable it is, the styling room to adjust the radius elements and colors, with somthing i'm working to build themes to apply to adw-gtk3 and libadwaita (via gradience) and qt via kvantum there will be possible to have fully consistent themeing on linux with the small caveat that all the wdigets use the adwaita styling... which is not compact...
there's some use to having refference posts be quoted, tho permalinks would be the way to go...
as for systemd-boot, how about a fork that only changes the name, something like egummiboot, as long as the source keeps unrelated to systmed (no hard dependency) the main dev can comfortably be sed doing all the necessary iterations of:
sed 's/systemd-boot/egummiboot/g'i mean, php is not great but calling it malware isn't a bit too much?
two almost useless scripts that at best only other 3 guys may use.
it doesn't help either that devuan is on a weird spot regarding eudev, eudev upstream is already on 3.2.14 and moving towards what could be 3.2.15 or 3.3.0 while we got 3.2.12 with a couple PRs from upstream merged in (#253 that adds the api from udev 247 and bumps compat to udev 251, a fix to sgx groups and fix of the walrus operator) the devuan package still lacks important PRs from upstream such as #255 that cleans the sysattr cache (important to get upower and other stuff that relies on the new api to work), and after trying to build eudev from source it ain't as trivial as it seems (doesn't help that i also need an i386 build for steam stuff) so the current options are to wait until the next release of eudev hits devuan unstable OR maintain a repo to build the devuan eudev source with the important missing commits added as patches.
nevermind, thanks Boian! https://pkginfo.devuan.org/cgi-bin/pack … v=3.2.14-1
does maintenance of software count? if so then i'm hating myself for ever deciding to help maintain this but i use it so not much i can complain about...
huh, interesting how the advancement of artificial intelligence correlates with the growth of the natural human stupidity.
let's hope that AI essays break the education system so hard a real reform is finally deployed... but knowing it is a goverment run chimp cage the most likely is that they will come up with a useless method to try and ban AI written essays...
welp, took some time to do some checks on the config file, still need to do some others but as an initial release this should be okay.
https://github.com/eylles/sct-daemon/re … tag/v0.0.0
i will probably stick with the 0ver scheme for this and similar projects.
well, it works okay but i need to add checks that the values from the config file are valid before applying them, also perhaps adding a logging functionality, other than that it is okay enough.
welp, here some interesting things i've cobbled together with what little i know.
shed: a user services daemon independient from any init, still work in progress. https://github.com/eylles/shed
afreq.sh: a proof of concept to imitate autocpu-freq without python and bloat. https://github.com/eylles/afreq.sh
awkat: like the popular bat program but made with posix shell and awk. https://github.com/eylles/awkat
sct-daemon: my own version of a daemon for sct, nice if you like the redshift function but don't like the bloat of the program. https://github.com/eylles/sct-daemon
fzf-copypasta: shitpost with style!. https://github.com/eylles/fzf-copypasta
fzf-menu: replace dmenu with fzf and your fave terminal, i intend to make this a proper repo and a proper dmenu replacement. https://gist.github.com/MahouShoujoMivu … id=4331478
the first version of shed, v.0.0.0 is finally out
https://codeberg.org/eylles/shed/releases
after this i plan to work on the rest of intended features, bash completion and a man page.
ah well, a little status update for those interested in shed, i will put out a release tag once i'm done with another 3 points of the todo list on the repo.
as for showing the status i went for something that those acquainted with sysvinit will find familiar.
yep the printf didn't ran after the killchilds() function was done, that has been corrected now, also added a basic makefile, this combined with the reloading capability of shed working properly makes it easier to test changes and commit them as i go.
thanks, added the fallback for the XDG_CONFIG_HOME variable, haven't had the time to test that the reload function works as intended but will give it a try as soon as possible and correct it as needed.
okay, now shed is on a working state i just have to really iron out the kinks, i'm already running it on my .xsession and did reload the session services, i would be really glad if anyone who has knowledge of sysvinit and init scripts take a look and comment on my approach.
this is very much a work in progress, still testing some functions before i can consider i'm at v0.0.0 but at the current state you can get a good idea of how it works, while the client component is mostly ready i've been rewriting some functions of the daemon to be able to do "start all" and "start service_name" gracefully from the same function, anyway here is the codeberg repo, will create the mirrors on github and gitlab later.
more details on the readme
https://codeberg.org/eylles/shed
yes i DO gotta improve the wording of that readme.
Been on devuan ceres since december 2020, it just works, only thing ever broke was gimp, but i ran a sudo aptitude full-upgrade the next week and it got fixed, the obly other problem i had was with logs and cache filling up my root partition but ncdu took care of that, now i just got a cronjob to yeet all logs weekly.