rpmbuild - Create log file when installing rpm -
what best way create log file in rpm spec file? service i'm creating runs under unprivileged user cannot create files in /var/log/.
you create /var/log/myservice/
directory , make owned user. inside %install or make install: (ignoring buildroot & such)
install -d /var/log/myservice -o serviceuser -m 750
this assumes running service apache runs user apache
, still puts logs in var/log/apache
then add corresponding rule /var/log/myservice
in spec file.
%dir /var/log/myservice
Comments
Post a Comment