Skip to content

Commit

Permalink
transmission: Don't create dedicated user account by default
Browse files Browse the repository at this point in the history
  • Loading branch information
MiLo committed Jan 22, 2011
1 parent 3442265 commit 5f18ec7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
9 changes: 5 additions & 4 deletions recipes/transmission/files/config
@@ -1,8 +1,9 @@
# Default values for transmission daemon
# please fill in and enable service.
DAEMON_ENABLED="NO"
DAEMON_USER="transmission"
DAEMON_GROUP="transmission"
DOWNLOAD_DIR="/media/sda1/torrents/"
# Set DAEMON_USER to run under different credentials
DAEMON_ENABLED="YES"
DAEMON_USER=""
DAEMON_GROUP=""
DOWNLOAD_DIR="/media/hdd/torrents/"
CONFIG_DIR="/var/lib/transmission-daemon"

2 changes: 1 addition & 1 deletion recipes/transmission/files/init
Expand Up @@ -18,7 +18,7 @@ fi
# Exit if the package is not installed
test -f /usr/bin/transmission-daemon || exit 0

SSDOPTIONS="--chuid $DAEMON_USER:$DAEMON_GROUP"
[ -z "$DAEMON_USER" ] || SSDOPTIONS="--chuid $DAEMON_USER:$DAEMON_GROUP"
TRANSOPTIONS="-g $CONFIG_DIR -w $DOWNLOAD_DIR"

case "$1" in
Expand Down
13 changes: 1 addition & 12 deletions recipes/transmission/transmission.inc
Expand Up @@ -4,7 +4,7 @@ HOMEPAGE = "www.transmissionbt.com/"
DEPENDS = "gtk+ gnutls openssl gettext libtool intltool-native curl glib-2.0-native"
DEPENDS_openpli = "gnutls openssl libtool curl glib-2.0-native libevent"
LICENSE = "GPLv2"
PR = "r5"
PR = "r7"
SRC_URI = "http://mirrors.m0k.org/transmission/files/transmission-${PV}.tar.bz2;name=archive \
file://init \
file://config"
Expand All @@ -31,14 +31,3 @@ FILES_${PN}-client = "${bindir}/transmissioncli ${bindir}/transmission-remote"
FILES_${PN}-gui += "${bindir}/transmission ${datadir}/icons ${datadir}/applications ${datadir}/pixmaps"
CONFFILES_${PN} = "${sysconfdir}/default/transmission-daemon"

# No need for online check, since update-rc.d will prepend it to here
pkg_postinst_${PN}() {
grep -q transmission ${sysconfdir}/group || addgroup transmission
grep -q transmission ${sysconfdir}/passwd || adduser -h ${localstatedir}/lib/transmission-daemon -S -D -G transmission -s ${base_bindir}/false transmission
chown -R transmission:transmission /var/lib/transmission-daemon/
}

pkg_postrm_${PN}() {
delgroup transmission
deluser transmission
}

0 comments on commit 5f18ec7

Please sign in to comment.