keithzg | Hmm so how would I make user systemd units actually start automatically? I have some defined like https://paste.ubuntu.com/p/JNyShVS87D/ but after both a `systemctl --user enable my-path-watching-thing.path` on them and a `sudo loginctl enable-linger keithzg` in case that was the issue, I still have to manually start them after reboots. I bet I'm missing *something* obvious, but I dunno what! | 00:45 |
---|---|---|
sarnold | keithzg: is there anything in journalctl about the units? | 00:48 |
keithzg | sarnold: Just lines logging it automatically shutting down, the "-- Reboot --" lines, and then it logs when I manually start; that seems to be it. | 01:23 |
sarnold | keithzg: hmm... do you have both the path *and* the service enabled? | 01:24 |
keithzg | sarnold: The .path is enabled, the .service is not enableable; it just runs a script so I was under the impression I'd not need to have an [Install] section since it wasn't constantly running, but being intermittently triggered by the .path unit? | 01:37 |
sarnold | keithzg: oh. hmm. | 01:37 |
sarnold | keithzg: sure enough, a .service that I run via a .timer is also not enabled and doesn't have an [Install] section. | 01:38 |
=== gschanuel218 is now known as gschanuel21 | ||
=== genii is now known as genii-core | ||
mason | keithzg: User services aren't intended to be used that way, generally. Typically you just want to have root manage a unit and set User= | 02:15 |
mason | That said, newer systemd might be doing it, thinking about user-run podman and similar. | 02:16 |
keithzg | mason: Yeah in no small part this is me trying to be overly cute, heh, like hey if the service is running as the user I should be able to configure and handle it purely with user privs! And as per https://www.freedesktop.org/software/systemd/man/loginctl.html#enable-linger%20USER%E2%80%A6 it *should* be possible, at least from my reading of the docs (I could certainly be wrong!) | 02:24 |
keithzg | Simply having a "User=keithzg" and plonking them down in /etc would certainly be the saner and easier approach! | 02:24 |
mason | keithzg: So, I was thinking of podman, and found this: https://docs.podman.io/en/latest/markdown/podman-generate-systemd.1.html | 02:25 |
mason | keithzg: I'm not sure what version of systemd is required for this to work, but skim that and scroll down at some point to "Installation of generated systemd unit files" | 02:25 |
mason | RHEL 8 does it. Presumably newer Ubuntu does it. Not sure the best way to find out what's enabled and when. | 02:26 |
keithzg | mason: Yeah that definitely mentions the same thing I figured was my silver bullet, `loginctl enable-linger <username>`, then the page's last updated bits being April 2020 gives me hope that it's not *too* new of a systemd version I'd need (also I didn't get any errors spat out by loginctl...). The server in question *is* on 20.04 though, so being too old wouldn't be super surprising. | 02:28 |
keithzg | (I'll definitely keep podman in mind if I find myself dealing with Docker containers again! I remember it being surprisingly iffy to get those running automatically, although some of that could easily just be my unfamiliarity with Docker haha) | 02:30 |
mason | keithzg: Are you setting up ~/.config/systemd/user/foo ? | 02:30 |
mason | keithzg: And I'm pretty sure it Just Doesn't Work before some point, which is probably the critical thing once you're lingering and .configging and wolpertinging and such. | 02:31 |
mason | keithzg: There are some technical people here who can probably provide better answers if you stick around, anyway. | 02:32 |
keithzg | mason: Yup, indeed ~/.config/systemd/user/my-thing.path and the like. And yeah I'm not going anywhere, and will be very interested if anyone else has any ideas! I may eventually just resort to User= lines and putting it in /etc like a normal person though haha | 02:41 |
=== not_phunyguy is now known as phunyguy | ||
=== jgee1 is now known as jgee | ||
=== mgedmin_ is now known as mgedmin | ||
=== Avago_Broadqual0 is now known as Avago_Broadqual | ||
=== LarsErik1 is now known as LarsErikP | ||
=== ajfriesen7 is now known as ajfriesen | ||
=== kdas_ is now known as kushal | ||
winshit | hi there! i am hoping somebody can help me to get grafana-server to start on port 80? i created a systemd unit override and added three lines to it: | 11:29 |
winshit | CapabilityBoundingSet=CAP_NET_BIND_SERVICE , AmbientCapabilities=CAP_NET_BIND_SERVICE as well as PrivateUsers=false | 11:30 |
winshit | during start of the service i still get "bind:permission denied" | 11:31 |
winshit | its a ubuntu 20.04.3 lts server | 11:33 |
winshit | can somebody help me with that? | 11:34 |
=== masACC is now known as maswan | ||
winshit | anybody awake yet? | 12:56 |
winshit | during start of the grafana-server service i still get "bind:permission denied" | 12:56 |
winshit | even though i created a systemd unit override with: CapabilityBoundingSet=CAP_NET_BIND_SERVICE , AmbientCapabilities=CAP_NET_BIND_SERVICE as well as PrivateUsers=false | 12:56 |
winshit | my understanding is that those capabilities should suffice for grafana-sever to start on port 80 | 12:57 |
=== thegodsquirrel is now known as theSantasquirrel | ||
POQDavid | Hey guys i am running latest Ubuntu server and been trying to mount a nfs drive for backup and it keeps hangs while transfering large files what mount options is better to use like defaults,sync,rsize=65536,wsize=65536 is it any good? | 14:05 |
=== genii-core is now known as genii | ||
mybalzitch | BOOTS | 22:01 |
mybalzitch | oops | 22:01 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!