Changeset 29953ea for debian/i2p.config


Ignore:
Timestamp:
Feb 18, 2015 10:25:24 PM (5 years ago)
Author:
kytv <kytv@…>
Branches:
master
Children:
6d58f9a
Parents:
bb9cef1
Message:

Debian: confine daemon with apparmor (ticket #1061)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/i2p.config

    rbb9cef1 r29953ea  
    1 #!/bin/sh -e
     1#!/bin/sh
     2
     3set -e
    24# I2P package configuration script
    35
     
    810# Load config file if it exists
    911if [ -e $conffile ]; then
    10         . $conffile
     12    . $conffile
    1113
    12         # wrapper.config always takes priority
    13         MEMORYLIMIT=$(sed -e '/^wrapper\.java\.maxmemory/!d' -e 's/^wrapper\.java\.maxmemory\ *=\ *//' /etc/i2p/wrapper.config)
     14    # wrapper.config always takes priority
     15    MEMORYLIMIT=$(awk -F= '/^wrapper\.java\.maxmemory/{print $2}' /etc/i2p/wrapper.config)
    1416
    15 
    16         db_set i2p/daemon "$RUN_DAEMON"
    17         db_set i2p/user "$I2PUSER"
    18         db_set i2p/memory "$MEMORYLIMIT"
     17    db_set i2p/daemon "$RUN_DAEMON"
     18    db_set i2p/user "$I2PUSER"
     19    db_set i2p/memory "$MEMORYLIMIT"
     20    db_set i2p/aa "$CONFINE_WITH_APPARMOR"
    1921fi
    2022
    2123db_input medium i2p/daemon || true
    2224db_go
     25
    2326db_get i2p/daemon || true
    2427if [ "$RET" = "true" ]; then
    25         db_input medium i2p/user || true
    26         db_go
     28    db_input medium i2p/user || true
     29    db_go
    2730fi
    2831
    2932db_input medium i2p/memory || true
    3033db_go
     34
     35db_input medium i2p/aa || true
     36db_go
     37
     38# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
Note: See TracChangeset for help on using the changeset viewer.