mirror of https://github.com/yandex/odyssey.git
Added spec file for CentOS 7 & systemd units
This commit is contained in:
parent
873443b5c3
commit
984aa91a67
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Advanced multi-threaded PostgreSQL connection pooler and request router
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=odyssey
|
||||
Group=odyssey
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/odyssey /etc/odyssey/odyssey.conf
|
||||
LimitNOFILE=100000
|
||||
LimitNPROC=100000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
Name: odyssey
|
||||
Version: 3.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Advanced multi-threaded PostgreSQL connection pooler and request router
|
||||
|
||||
Group: Applications/Network
|
||||
License: BSD 3-clause
|
||||
URL: https://github.com/yandex/odyssey
|
||||
Source0: odyssey.tar.gz
|
||||
|
||||
BuildRequires: cmake
|
||||
BuildRequires: openssl-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: gcc
|
||||
|
||||
%description
|
||||
Advanced multi-threaded PostgreSQL connection pooler and request router
|
||||
|
||||
%prep
|
||||
%setup -q -n odyssey
|
||||
|
||||
|
||||
%build
|
||||
cmake .
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
%install
|
||||
install -D -m 755 sources/odyssey $RPM_BUILD_ROOT/usr/bin/odyssey
|
||||
install -D -m 644 odyssey.conf $RPM_BUILD_ROOT/etc/odyssey/odyssey.conf
|
||||
install -D -m 644 odyssey.service $RPM_BUILD_ROOT/usr/lib/systemd/system/odyssey.service
|
||||
install -D -m 644 odyssey@.service $RPM_BUILD_ROOT/usr/lib/systemd/system/odyssey@.service
|
||||
|
||||
%pre
|
||||
useradd -md /usr/lib/odyssey odyssey >/dev/null 2>&1 || exit 0
|
||||
|
||||
%files
|
||||
%attr(0755, root, root) /usr/bin/odyssey
|
||||
%dir %attr(0755, root, root) /etc/odyssey/
|
||||
%config(noreplace) %attr(0644, root, root) /etc/odyssey/odyssey.conf
|
||||
%attr(0644, root, root) /usr/lib/systemd/system/odyssey.service
|
||||
%attr(0644, root, root) /usr/lib/systemd/system/odyssey@.service
|
||||
|
||||
|
||||
%changelog
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=Advanced multi-threaded PostgreSQL connection pooler and request router
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=odyssey
|
||||
Group=odyssey
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/odyssey /etc/odyssey/%i.conf
|
||||
LimitNOFILE=100000
|
||||
LimitNPROC=100000
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
Reference in New Issue