add synergy CLI to bin/

Rename bin/synergy to bin/synergy-service.
Add the synergy client command as bin/synergy.

Impact changes to the packaging.

Change-Id: If3b6c3799906a40481c5e0fb4c67de2f6a0ccba9
This commit is contained in:
Vincent Llorens 2016-06-07 12:08:04 +02:00
parent fe8dae24a8
commit 4bd94d9fbd
7 changed files with 35 additions and 23 deletions

View File

@ -3,7 +3,7 @@
import sys
from synergy.service import main
from synergy.client.shell import main
if __name__ == "__main__":

10
bin/synergy-service Normal file
View File

@ -0,0 +1,10 @@
#!/usr/bin/python
# PBR Generated from u'console_scripts'
import sys
from synergy.service import main
if __name__ == "__main__":
sys.exit(main())

View File

@ -19,7 +19,7 @@
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="python-synergy-service"
NAME=synergy
DAEMON=/usr/sbin/synergy
DAEMON=/usr/sbin/synergy-service
DAEMON_ARGS=""
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

View File

@ -15,5 +15,5 @@ script
DAEMON_ARGS=""
exec start-stop-daemon --start --chdir /var/lib/synergy \
--chuid synergy:synergy --make-pidfile --pidfile /var/run/synergy/synergy.pid \
--exec /usr/bin/synergy -- --config-file=/etc/synergy/synergy.conf ${DAEMON_ARGS}
--exec /usr/bin/synergy-service -- --config-file=/etc/synergy/synergy.conf ${DAEMON_ARGS}
end script

View File

@ -1,27 +1,27 @@
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name: python-synergy-service
Version: 0.2
Release: 2%{?dist}
Summary: Synergy service
Name: python-synergy-service
Version: 0.2
Release: 2%{?dist}
Summary: Synergy service
License: ASL 2.0
URL: https://launchpad.net/synergy-service
Source0: https://launchpad.net/synergy-service/%{name}-%{version}.tar.bz2
License: ASL 2.0
URL: https://launchpad.net/synergy-service
Source0: https://launchpad.net/synergy-service/%{name}-%{version}.tar.bz2
BuildArch: noarch
BuildRequires: systemd
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
BuildArch: noarch
BuildRequires: systemd
BuildRequires: python-devel
BuildRequires: python-setuptools
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires: python-eventlet
Requires: python-oslo-config
Requires: python-oslo-messaging
Requires: python-oslo-log
Requires: python-dateutil
Requires: python-eventlet
Requires: python-oslo-config
Requires: python-oslo-messaging
Requires: python-oslo-log
Requires: python-dateutil
%description
@ -59,6 +59,7 @@ install -d -m0755 %{buildroot}%{_localstatedir}/lock/s
%{python_sitelib}/*
%config(noreplace) %{_sysconfdir}/synergy/synergy.conf
%{_bindir}/synergy
%{_bindir}/synergy-service
%{_unitdir}/synergy.service
%defattr(-, synergy, root, -)
%{_localstatedir}/lock/synergy/

View File

@ -6,7 +6,7 @@ After=mysql.service postgresql.service slapd.service rabbitmq-server.service ntp
User=synergy
Group=synergy
WorkingDirectory=/var/lib/synergy
ExecStart=/usr/bin/synergy
ExecStart=/usr/bin/synergy-service
[Install]
WantedBy=multi-user.target

View File

@ -22,6 +22,7 @@ packages =
synergy
scripts =
bin/synergy
bin/synergy-service
[entry_points]
synergy.managers =