aminda-nocron-reboot: allow overriding linuxbrew user as well

This commit is contained in:
Aminda Suomalainen 2024-09-22 10:46:37 +03:00
parent 49abe98648
commit 37bb05fdc9
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
2 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,7 @@ Wants=sysctl-p--system.service
[Service]
Type=oneshot
TimeoutStartSec=infinity
Environment=LINUXBREWUSER=root
Environment=LINUXBREWGROUP=wheel
ExecStartPre=-/usr/bin/echo 1 > /sys/devices/system/cpu/microcode/reload
# - means it can fail, without failing those after it.
@ -49,7 +50,7 @@ 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=-/usr/bin/systemctl enable --now systemd-oomd.service systemd-oomd.socket
ExecStart=-/bin/chown -R root:${LINUXBREWGROUP} /home/linuxbrew -R
ExecStart=-/bin/chown -R ${LINUXBREWUSER}:${LINUXBREWGROUP} /home/linuxbrew -R
ExecStart=-/bin/chmod -R u+rw,g+rw,o+r /home/linuxbrew
ExecStart=-/bin/setfacl -R -m g:${LINUXBREWGROUP}:rwX,o:rX /home/linuxbrew
User=root

View File

@ -1,5 +1,7 @@
# in case linuxbrew users have a group separate from wheel, this is the place
# to specify it.
[Service]
Environment=LINUXBREWUSER=
Environment=LINUXBREWUSER=root
Environment=LINUXBREWGROUP=
Environment=LINUXBREWGROUP=linuxbrew