feat(rpm): create mistralrs system user and group on install
All checks were successful
poll-upstream / check (push) Successful in 1s
All checks were successful
poll-upstream / check (push) Successful in 1s
Add %pre scriptlet to ensure the mistralrs user and group exist before the package files are installed. The systemd unit runs the service as this user. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,10 @@ sed -i "s|@BINARY@|%{_bindir}/mistralrs-server|g" \
|
|||||||
sed -i "s|@FLAVOUR@|%{mistralrs_flavour}|g" \
|
sed -i "s|@FLAVOUR@|%{mistralrs_flavour}|g" \
|
||||||
%{buildroot}%{_unitdir}/mistralrs@.service
|
%{buildroot}%{_unitdir}/mistralrs@.service
|
||||||
|
|
||||||
|
%pre
|
||||||
|
getent group mistralrs >/dev/null || groupadd -r mistralrs
|
||||||
|
getent passwd mistralrs >/dev/null || useradd -r -g mistralrs -d /var/lib/mistralrs -s /sbin/nologin mistralrs
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%systemd_post mistralrs@.service
|
%systemd_post mistralrs@.service
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user