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 import sys
from synergy.service import main from synergy.client.shell import main
if __name__ == "__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 PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="python-synergy-service" DESC="python-synergy-service"
NAME=synergy NAME=synergy
DAEMON=/usr/sbin/synergy DAEMON=/usr/sbin/synergy-service
DAEMON_ARGS="" DAEMON_ARGS=""
PIDFILE=/var/run/$NAME.pid PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME SCRIPTNAME=/etc/init.d/$NAME

View File

@ -15,5 +15,5 @@ script
DAEMON_ARGS="" DAEMON_ARGS=""
exec start-stop-daemon --start --chdir /var/lib/synergy \ exec start-stop-daemon --start --chdir /var/lib/synergy \
--chuid synergy:synergy --make-pidfile --pidfile /var/run/synergy/synergy.pid \ --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 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())")} %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name: python-synergy-service Name: python-synergy-service
Version: 0.2 Version: 0.2
Release: 2%{?dist} Release: 2%{?dist}
Summary: Synergy service Summary: Synergy service
License: ASL 2.0 License: ASL 2.0
URL: https://launchpad.net/synergy-service URL: https://launchpad.net/synergy-service
Source0: https://launchpad.net/synergy-service/%{name}-%{version}.tar.bz2 Source0: https://launchpad.net/synergy-service/%{name}-%{version}.tar.bz2
BuildArch: noarch BuildArch: noarch
BuildRequires: systemd BuildRequires: systemd
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: python-setuptools BuildRequires: python-setuptools
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(post): systemd Requires(post): systemd
Requires(preun): systemd Requires(preun): systemd
Requires(postun): systemd Requires(postun): systemd
Requires: python-eventlet Requires: python-eventlet
Requires: python-oslo-config Requires: python-oslo-config
Requires: python-oslo-messaging Requires: python-oslo-messaging
Requires: python-oslo-log Requires: python-oslo-log
Requires: python-dateutil Requires: python-dateutil
%description %description
@ -59,6 +59,7 @@ install -d -m0755 %{buildroot}%{_localstatedir}/lock/s
%{python_sitelib}/* %{python_sitelib}/*
%config(noreplace) %{_sysconfdir}/synergy/synergy.conf %config(noreplace) %{_sysconfdir}/synergy/synergy.conf
%{_bindir}/synergy %{_bindir}/synergy
%{_bindir}/synergy-service
%{_unitdir}/synergy.service %{_unitdir}/synergy.service
%defattr(-, synergy, root, -) %defattr(-, synergy, root, -)
%{_localstatedir}/lock/synergy/ %{_localstatedir}/lock/synergy/

View File

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

View File

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