Wuala init.d Script for Debian/Ubuntu (Improved)

I recently wanted to install Wuala on my brand new media center PC running Ubuntu on it. It was not that hard because there is an excellent tutorial on how to setup wuala on a headless machine.

Unfortunately there was no script to start and stop Wuala on system start-up and shutdown. So I decided to create one.

/etc/init.d/wuala (download)

It is a very early version with not much error checking, so use it at your own risk. I just posted it in case somebody might find it useful.

To use it just save the content to /etc/init.d/wuala and run

Update: Added the necessary LSB informations
Update 2: The file can now be downloaded: /etc/init.d/wuala.
Upadte 3: Use wualacmd instead of wuala. (Thanks to http://www.synergeek.fr/2010/06/wuala-sous-linux/ for the hint)
Upadte 4: The new version checks if wuala is already running for the given user.

16 thoughts on “Wuala init.d Script for Debian/Ubuntu (Improved)”

  1. Seems to be exactly what I was looking after. Could you just provide a bit more explanations on how to use your script since I am quite novice in Ubuntu.
    I understand I need to create a wuala account on my ubuntu box.
    Then I need to insert your script into the boot thing /etc/init.d
    Then I’m not too sure.
    I obtain the following error msg:
    sudo update-rc.d wuala defaults
    update-rc.d: warning: /etc/init.d/wuala missing LSB information
    update-rc.d: see

    Normal?

    Does Wuala starts completely automatically when configured this way?
    How can I interact with it?

    Many thanks in advance for your responses
    Tugdual

  2. Pingback: Wuala sous Linux
  3. Thanks for the script, I edited it a little, my version has some error handling. The original script wil start wuala on a status or stop command if it is not already running.

    #!/bin/bash

    ### BEGIN INIT INFO
    # Provides: wuala
    # Required-Start: $network $local_fs $remote_fs
    # Required-Stop: $network $local_fs $remote_fs
    # Default-Start: 2 3 4 5
    # Default-Stop: 0 1 6
    # Short-Description: start Wuala headless (wuala)
    ### END INIT INFO

    WUALAUSR=froh
    wualacmd=/usr/bin/wualacmd

    uptest(){
    if ps aux|grep -v grep|grep loader3.jar >/dev/null;then
    echo "Wuala is running"
    return 0
    else
    echo "Wuala is not running"
    return 1
    fi
    }

    case "${1:-''}" in
    'start')
    # start commands here
    echo "Starting Wuala..."
    uptest || su $WUALAUSR -c "$wualacmd" &
    uptest
    ;;

    'stop')
    # stop commands here
    echo "Stopping Wuala..."
    uptest && su $WUALAUSR -c "$wualacmd exit"

    ;;

    'restart')
    # restart commands here
    su $WUALAUSR -c "$wualacmd restart" &
    ;;

    'status')
    # status commands here
    cd $WUALADIR
    uptest && su $WUALAUSR -c "$wualacmd showStatus"
    uptest && su $WUALAUSR -c "$wualacmd connectionInfo"
    uptest && su $WUALAUSR -c "$wualacmd showSettings"
    ;;

    *)
    # no parameter specified
    echo "Usage: $SELF start|stop|restart|status"
    exit 1
    ;;
    esac

  4. Pingback: Wuala | amedee.be
  5. I was frustrated by the 100gb limit, and also wanted a way to control wuala via the service. So using the same basic principles I wrote a new script. I now have a ubuntu based server that trades about 800gb of storage–don’t worry, I have an internet connection that can handle it.

    It includes the ability to manage multiple instances of wuala, and also to pass a command wuala as one or more users. It took most of the leg work out of configuring and starting wuala.

    I think its fairly well commented, but if you have any questions just reply, I’ll probably be checking here. (and sorry for cutting in Pascal, I love your work, but I just wanted to share this.)

  6. do comment out the code for creating the ~$usr/wuala It doesnt work properly for some reason. it works if you substitute in the username, just not as is. (I’ve tried using “”) sorry for spamming up your comments, I hope its useful enough to warrant it.

  7. I’ve had it running for a couple of days now, and I think i’ve stretched my low-end server system to the limit. I’ve had one system freezeup. I may extend the script further to manage the number of instances based on server load, but that is just something to watch out for. Wuala as we all know is java based, and java has been and will always be bloated. so, if all of your wuala instances decide to start downloading other users encrypted data, their memory usage will skyrocket. and this causes a whole slew of issues.

  8. Thanks for some nice scripts. Came in handy when I had to dig out some old hardware and put together a dedicated wuala server using debian (6.0.x). If anyone needs a reference the hardware is an old compaq 433Mhz with 3xxMB RAM and 2x100GB HD. I did a fast and dirty server installation from the first debian CD. I regret I did not chose LVM configurations on the disks.

    I got wuala running with the help of the effective-usage-running-wuala-on-debian. Notice that wuala has a deb package on their download site for you. Install it with dpkg -i filename.

    Now to the scripts.

    This construct in the start (and possibly stop) function(s) needs a timeout.
    while ( ! uptest $usr)
    do

    In the start case the uptest always return false (I don’t know why. Looks like ps don’t return the expected result before you get a logon shell/prompt).
    My modification
    let "count=0"
    while ( ! uptest $usr && [ $count -lt 2 ] )
    let "$count += 1"
    do

    ..:o)

Leave a Reply

Your email address will not be published.