File: amuled_home_wrapper.sh

package info (click to toggle)
amule 1%3A2.3.2-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 27,584 kB
  • sloc: cpp: 115,104; ansic: 8,572; sh: 5,729; makefile: 1,706; php: 1,680; perl: 955; yacc: 822; ruby: 729; objc: 692; lex: 633; java: 413; xml: 27; python: 26; awk: 21; sed: 16
file content (35 lines) | stat: -rwxr-xr-x 861 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /bin/sh

# This script gets called by /etc/init.d/amule-daemon, and its purpose
# is to honour the AMULED_HOME variable in /etc/default/amule-daemon.
# This can't be done in the init script itself because HOME gets reset
# by start-stop-daemon on --chuid, or so it seems.
#
# It also sets up a sensible locale, needed by amuled to properly handle
# files with non-ASCII characters.

. /etc/default/amule-daemon

if [ -n "$AMULED_HOME" ]; then
    HOME="$AMULED_HOME"
    export HOME
fi

# Test whether we have some LANG variable set; if we do, do not read
# /etc/default/locale.
: ${L:=$LC_ALL}
: ${L:=$LC_CTYPE}
: ${L:=$LANG}

if [ -z "$L" ] && [ -r /etc/default/locale ]; then
    . /etc/default/locale
    for v in "$LC_ALL" "$LC_CTYPE" "$LANG"; do
	if [ -n "$v" ]; then
	    LANG="$v"
	    export LANG
	    break
	fi
    done
fi

exec /usr/bin/amuled -f