Changeset 5483306


Ignore:
Timestamp:
Jan 28, 2017 1:57:31 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
36fd93da
Parents:
1f228a3f
Message:

Utils: Detect when running as service on Gentoo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/util/SystemVersion.java

    r1f228a3f r5483306  
    2121     */
    2222    public static final String DAEMON_USER = "i2psvc";
     23    public static final String GENTOO_USER = "i2p";
    2324
    2425    private static final boolean _isWin = System.getProperty("os.name").startsWith("Win");
     
    6465        _isOpenJDK = runtime != null && runtime.contains("OpenJDK");
    6566        _isLinuxService = !_isWin && !_isMac && !_isAndroid &&
    66                           DAEMON_USER.equals(System.getProperty("user.name"));
     67                          (DAEMON_USER.equals(System.getProperty("user.name")) ||
     68                           (_isGentoo && GENTOO_USER.equals(System.getProperty("user.name"))));
    6769
    6870        int sdk = 0;
Note: See TracChangeset for help on using the changeset viewer.