From 391ec83b3805feca4ed350e97a6d7d892e70eb06 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Sun, 28 Jul 2024 13:04:57 +0300 Subject: [PATCH] aminda-nocron-reboot.service: attempt to help linuxbrew permissions --- etc/systemd/system/aminda-nocron-reboot.service | 3 +++ .../linuxbrew-group-override.conf | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 etc/systemd/system/aminda-nocron-reboot.service.d/linuxbrew-group-override.conf diff --git a/etc/systemd/system/aminda-nocron-reboot.service b/etc/systemd/system/aminda-nocron-reboot.service index 8f40a3a3..4c9952b3 100644 --- a/etc/systemd/system/aminda-nocron-reboot.service +++ b/etc/systemd/system/aminda-nocron-reboot.service @@ -5,6 +5,7 @@ Wants=sysctl-p--system.service [Service] Type=oneshot TimeoutStartSec=infinity +Environment=LINUXBREWGROUP=wheel # - means it can fail, without failing those after it. # These aren't given --now as THEY WOULD INFINITE LOOP. ExecStartPre=-/usr/bin/systemctl enable aminda-nocron-rebootish.service @@ -37,6 +38,8 @@ ExecStart=-/usr/bin/systemctl enable --now sshguard.service ExecStart=-/usr/bin/systemctl enable --now unbound.service ExecStart=-/usr/bin/systemctl enable --now chrony.service ExecStart=-/usr/bin/systemctl enable --now chronyd.service +ExecStart=-/bin/chown -R root:$LINUXBREWGROUP /home/linuxbrew -R +ExecStart=-/bin/setfacl -R -m g:$LINUXBREWGROUP:rwx,o:rx /home/linuxbrew User=root StandardOutput=journal StandardError=journal diff --git a/etc/systemd/system/aminda-nocron-reboot.service.d/linuxbrew-group-override.conf b/etc/systemd/system/aminda-nocron-reboot.service.d/linuxbrew-group-override.conf new file mode 100644 index 00000000..873614aa --- /dev/null +++ b/etc/systemd/system/aminda-nocron-reboot.service.d/linuxbrew-group-override.conf @@ -0,0 +1,5 @@ +# in case linuxbrew users have a group separate from wheel, this is the place +# to specify it. +[Service] +Environment=LINUXBREWGROUP= +Environment=LINUXBREWGROUP=linuxbrew