@10leej I am humbly requesting your assistance in writing one to two lines of systemd service file for a package manager I have no experience with.
@splitshockvirus hoestly what I do is copy an service file to use as a template and modify it.
What package manager and what action?
asdf, running mix
in the execute start I need to be able to source .bashrc before executing the binary.
@splitshockvirus So here's my simple backup file. Breaking it down all you really need to do is just add your command in ExecStart and enter it in just like a terminal one liner. You can even source a executable bash script with it.
@splitshockvirus dtrop that in /etc/systemd/system/filename.service or /home/$USER/.config/systemd/user/filename.service
then run systemctl daemon-reload or reboot and you can run it.
So here's pleroma's example service file.
https://git.pleroma.social/pleroma/pleroma/-/blob/develop/installation/pleroma.service
Observer the
ExecStart=/usr/bin/mix phx.server
@10leej mix is like an elixir or erlang thing.
You can install them normally with
sudo apt install elixir erlang-dev erlang-nox
However we can't use them because the ones for Ubuntu are too old so instead I'm trying to use a langauge manager called asdf to install elixir erlang.
asdf can be installed easily on any distro by following here: https://asdf-vm.com/guide/getting-started.html
Once you have that complete, you then need to install elixir and erlang plugins.
https://github.com/asdf-vm/asdf-elixir
https://github.com/asdf-vm/asdf-erlang
The program asdf requires you add two lines to the end of your .bashrc
. $HOME/.asdf/asdf.sh
. $HOME/.asdf/completions/asdf.bash
Those two lines are required to be sourced in order to use any program installed with asdf.
If I used the absolute path for the then installed mix. The locataion should be
~/.asdf/shims/mix
But in order to use that path you need to source .bashrc
If you don't systemd won't have the correct scripts to run and you'll just get a start failure.
@dj Damn, Ubuntu is hard! 🤪
Getting Pleroma to run in Void was a lot easier than that. TBH it took me more time to figure out ImageMagick dependencies to build it the way it doesn't require X11 libs.
@10leej @splitshockvirus
@splitshockvirus
It used to be Debian's problem, but now Ubuntu is just as bad.
Yeah, using Gentoo doesn't sound like a bad idea at this point.
@dj @10leej
@m0xee @splitshockvirus @dj ... docker....
@m0xee @dj @10leej
Running everything in Ubuntu is becoming annoying. The packages are becoming too old and everyone is making their software to use newer shit.
I might move to gentoo unironically.