Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %define name menlolab-runner
- %define version 0.1.4
- %define release 1
- %define buildroot %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
- Name: %{name}
- Version: %{version}
- Release: %{release}
- Summary: menlolab-runner
- Group: Installation Script
- License: MIT
- Source: %{name}.tar.gz
- BuildRoot: %{buildroot}
- Requires: nodejs
- BuildRequires: nodejs
- AutoReqProv: no
- %description
- The agent deployed on private and public infrastructure to manage tasks.
- %prep
- %setup -q -c -n %{name}
- %build
- npm prune --production
- npm rebuild
- %pre
- getent group menlolab-runner >/dev/null || groupadd -r menlolab-runner
- getent passwd menlolab-runner >/dev/null || useradd -r -g menlolab-runner -G menlolab-runner -d / -s /sbin/nologin -c "menlolab-runner" menlolab-runner
- %install
- mkdir -p %{buildroot}/usr/lib/menlolab-runner
- cp -r ./ %{buildroot}/usr/lib/menlolab-runner
- mkdir -p %{buildroot}/var/log/menlolab-runner
- %post
- systemctl enable /usr/lib/menlolab-runner/menlolab-runner.service
- ln -s /usr/lib/menlolab-runner/runner.js menlolab-runner
- chmod ugo+x /usr/lib/menlolab-runner/runner.js
- %clean
- rm -rf %{buildroot}
- %files
- %defattr(644, menlolab-runner, menlolab-runner, 755)
- /usr/lib/menlolab-runner
- /var/log/menlolab-runner
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement