Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 619861 Details for
Bug 862018
Provide native systemd service to uShare
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Add systemd unit file and drop SysV support
ushare-systemd-unit.diff (text/plain), 4.59 KB, created by
Juan Orti
on 2012-10-01 15:42:41 UTC
(
hide
)
Description:
Add systemd unit file and drop SysV support
Filename:
MIME Type:
Creator:
Juan Orti
Created:
2012-10-01 15:42:41 UTC
Size:
4.59 KB
patch
obsolete
>commit 10d1dc8bbebbaec9f48491b8d032bcbdd2af0493 >Author: Juan Orti Alcaine <j.orti.alcaine@gmail.com> >Date: Mon Oct 1 17:41:01 2012 +0200 > > Add systemd unit file > >diff --git a/ushare.init b/ushare.init >deleted file mode 100644 >index 55b55b5..0000000 >--- a/ushare.init >+++ /dev/null >@@ -1,80 +0,0 @@ >-#!/bin/sh >-# >-# ushare This shell script takes care of starting and stopping ushare. >-# >-# chkconfig: - 75 25 >-# description: uShare UPnP A/V Media Server. >-# >- >-# Source function library. >-. /etc/rc.d/init.d/functions >- >-# Source networking configuration. >-. /etc/sysconfig/network >- >-# Check that networking is up. >-[ ${NETWORKING} = "no" ] && exit 0 >- >-OPTIONS="" >-prog=ushare >-DESC="UPnP A/V Media Server" >- >-[ -r "/etc/ushare.conf" ] && . /etc/ushare.conf >-# abort if no shared directory is defined >-[ -z "$USHARE_DIR" ] && exit 0 >- >- >-start() { >- echo -n $"Starting $prog: " >- daemon --user ushare $prog -d -D >- RETVAL=$? >- echo >- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog >-} >- >-stop() { >- echo -n $"Stopping $prog: " >- killproc $prog >- RETVAL=$? >- echo >- [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog >-} >- >-reload() { >- echo -n $"Reloading $prog: " >- killproc $prog -HUP >- RETVAL=$? >- echo >-} >- >-# See how we were called. >-case "$1" in >- start) >- start >- ;; >- stop) >- stop >- ;; >- status) >- status $prog >- RETVAL=$? >- ;; >- restart) >- stop >- start >- ;; >- condrestart) >- if [ -f /var/lock/subsys/$prog ]; then >- stop >- start >- fi >- ;; >- reload) >- reload >- ;; >- *) >- echo $"Usage: $prog {start|stop|restart|condrestart|reload|status" >- exit 1 >-esac >- >-exit $RETVAL >diff --git a/ushare.service b/ushare.service >new file mode 100644 >index 0000000..080d73a >--- /dev/null >+++ b/ushare.service >@@ -0,0 +1,10 @@ >+[Unit] >+Description=UPnP A/V Media Server >+After=network.target >+ >+[Service] >+Type=forking >+ExecStart=/usr/bin/ushare -d -D >+ >+[Install] >+WantedBy=multi-user.target >diff --git a/ushare.spec b/ushare.spec >index 2a4d38f..821b8fe 100644 >--- a/ushare.spec >+++ b/ushare.spec >@@ -1,24 +1,24 @@ > Summary: UPnP (TM) A/V & DLNA Media Server > Name: ushare > Version: 1.1a >-Release: 13%{?dist} >+Release: 14%{?dist} > License: LGPLv2+ > Group: Applications/Multimedia > URL: http://ushare.geexbox.org/ > > Source: http://ushare.geexbox.org/releases/%{name}-%{version}.tar.bz2 >-Source1:ushare.init >+Source2: ushare.service > Patch0: ushare-conf.patch > Patch1: ushare-error.patch > Patch2: 101-ushare-upnp-build-fix.patch > BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) > >-BuildRequires: libupnp-devel, pkgconfig >+BuildRequires: libupnp-devel, pkgconfig, systemd-units > Requires: /usr/sbin/alternatives > Requires(pre): fedora-usermgmt >-Requires(post): /sbin/chkconfig, /usr/sbin/alternatives >-Requires(preun): /sbin/service, /sbin/chkconfig, /usr/sbin/alternatives >-Requires(postun): /sbin/service >+Requires(post): /usr/sbin/alternatives, systemd-units >+Requires(preun): /usr/sbin/alternatives, systemd-units >+Requires(postun): systemd-units > > %description > uShare is a UPnP (TM) A/V & DLNA Media Server. It implements the server >@@ -43,7 +43,7 @@ make %{?_smp_mflags} > rm -rf %{buildroot} > %makeinstall DESTDIR=%{buildroot} > %{__rm} -rf %{buildroot}%{_sysconfdir}/init.d >-%{__install} -m 0755 -D %{SOURCE1} %{buildroot}%{_initrddir}/ushare >+%{__install} -m 0644 -D %{SOURCE2} %{buildroot}%{_unitdir}/ushare.service > %{__mkdir_p} %{buildroot}%{_var}/lib/ushare > %{__mv} %{buildroot}%{_bindir}/ushare %{buildroot}%{_bindir}/ushare-fedora > %find_lang %{name} >@@ -56,30 +56,30 @@ rm -rf %{buildroot} > -c "ushare service account" ushare &>/dev/null || : > > %post >-/sbin/chkconfig --add ushare >+%systemd_post ushare.service > alternatives --install %{_bindir}/ushare ushare %{_bindir}/ushare-fedora 10 > > %preun >+%systemd_preun ushare.service > if [ $1 -eq 0 ]; then >- /sbin/service ushare stop &>/dev/null || : >- /sbin/chkconfig --del ushare >-alternatives --remove ushare %{_bindir}/ushare-fedora >+ alternatives --remove ushare %{_bindir}/ushare-fedora > fi > > %postun >-if [ $1 -ge 1 ]; then >- /sbin/service ushare condrestart &>/dev/null || : >-fi >+%systemd_postun_with_restart ushare.service > > %files -f %{name}.lang > %defattr(-,root,root,-) > %doc AUTHORS ChangeLog COPYING NEWS README > %{_bindir}/ushare-fedora > %config(noreplace) %{_sysconfdir}/ushare.conf >-%{_initrddir}/ushare > %attr(770,ushare,ushare) %dir %{_var}/lib/ushare/ >+%{_unitdir}/ushare.service > > %changelog >+* Mon Oct 01 2012 Juan Orti Alcaine <j.orti.alcaine@gmail.com> - 1.1a-14 >+- Add systemd unit file >+ > * Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1a-13 > - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 862018
:
619860
| 619861