start script does not work

Bug #228929 reported by kobayashimaru on 2008-05-10
This bug affects 5 people
Affects Status Importance Assigned to Milestone
ushare (Ubuntu)

Bug Description

Binary package hint: ushare

/etc/init.d/ushare starts ushare by the following command:

start-stop-daemon --start --quiet --background --oknodo \
        --make-pidfile --pidfile $PIDFILE \
        --exec $DAEMON -- $USHARE_OPTIONS

However, the variable USHARE_OPTIONS is never set, so ushare is unconfigured (no shared directories are set etc.) so ushare won't even start.

Remi Debay (debay-remi-gmail) wrote :

I faced the same problem.

It looks the option $USHARE_OPTIONS has be set with this USHARE_OPTIONS=" --cfg $CONFIGFILE"

With this it works properly when asking a restart but i still have a problem on computer starting

MrZaius (cragos) wrote :

The solutions above really are about all that's necessary. That said, the sheer PITA level of hunting this down was increased exponentially by the failure of the script to push any of the errors to the logs. Despite multiple failures both from this and from "ushare -f /etc/ushare.conf" recently dieing when interrupted by another UPnP server, there's not a single mention of ushare in /var/log/* (barring my dpkg log). If you're tinkering with the script, piping ushare's output to messages (or at least optionally doing so) would also be extremely beneficial.

Jorge Castro (jorge) on 2009-09-16
Changed in ushare (Ubuntu):
status: New → Confirmed
Will (war59312) wrote :

Is this ever going to be fixed?

Yann Bloch (yann-bloch) wrote :


There are actually two problems in the start script for ushare.

1. It is launched with --background, so all the logs produced by the process on stdout are lost (or at least I could not find where they were sent to) and you can't see what went wrong when it doesn't start. Instead, the ushare -D command already makes the process run in background, and produces logs in /var/log/syslog.
2. uShare needs the configured network interface to be up and running. In recent Ubuntu distributions, network interfaces are no longer managed in sysV init scripts, but with Upstart. I did not find a nice way to ensure that the network interface was up in the sysV script. So I went for upstart.

Attached you will find an upstart script that worked for me (Ubuntu 12.10). If not using eth0 as your network interface you need to change the corresponding line in the script.

Just drop this file into /etc/init


Francois Marot (francois-marot) wrote :

Just to confirm that Yann Bloch's file works for mee too on KUbuntu 14.04.
I also aded the following symlink in order to be able to tab-complete the command "sudo service ushare start":
sudo ln -s /lib/init/upstart-job /etc/init.d/ushare

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers