Ignore:
Timestamp:
Jan 7, 2012 12:20:43 AM (9 years ago)
Author:
kytv <kytv@…>
Branches:
master
Children:
56a6772
Parents:
5067499f
Message:

Debian: Fix postinst script

On systems without an i2psvc group, the postinstall would fail. This change

will add the group if it doesn't exist. Also adding "
true" to the usermod

command in case the command returns a non-zero status.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/i2p.postinst

    r5067499f r0c81d51  
    6464    # Create user and group as a system user.
    6565    if getent passwd i2psvc > /dev/null 2>&1 ; then
     66        groupadd -f $I2PSYSUSER || true
    6667        usermod -c "I2P Router Daemon" -d $I2PHOME -g $I2PSYSUSER -s "/bin/false" \
    67             $I2PSYSUSER -e 1 > /dev/null 2>&1
     68            $I2PSYSUSER -e 1 > /dev/null 2>&1 || true
    6869    else
    6970        adduser --system --quiet --group --home $I2PHOME $I2PSYSUSER
     
    7172
    7273    [ -d /var/log/i2p ] || mkdir -m0750 /var/log/i2p
    73     chown -f -R $I2PSYSUSER:adm /var/log/i2p
     74    chown -f -R $I2PSYSUSER:i2psvc /var/log/i2p
    7475
    7576    # Has someone set the permissions with dpkg-statoverride? If so, obey them.
Note: See TracChangeset for help on using the changeset viewer.