-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix docker plugin dependency issues.
Improve updater do it doesn't have to contain the version number. Version 1.0.8
- Loading branch information
Showing
4 changed files
with
68 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,47 @@ | ||
package com.ftpix.homedash.app; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.nio.file.Paths; | ||
import java.util.ResourceBundle; | ||
|
||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
|
||
|
||
|
||
public class Constants { | ||
public final static String CACHE_FOLDER; | ||
public final static String DB_PATH; | ||
public final static int PORT; | ||
public final static String SALT; | ||
private static Logger logger = LogManager.getLogger(); | ||
|
||
static { | ||
logger.info("Loading conf file"); | ||
ResourceBundle rs = ResourceBundle.getBundle("homedash"); | ||
|
||
String path = rs.getString("cache_path"); | ||
public final static String CACHE_FOLDER; | ||
public final static String DB_PATH; | ||
public final static int PORT; | ||
public final static String SALT; | ||
private static Logger logger = LogManager.getLogger(); | ||
|
||
static { | ||
|
||
logger.info("Loading conf file"); | ||
ResourceBundle rs = ResourceBundle.getBundle("homedash"); | ||
|
||
String path = rs.getString("cache_path"); | ||
if (!path.endsWith("/")) { | ||
path += "/"; | ||
} | ||
path += "/"; | ||
} | ||
|
||
CACHE_FOLDER = path; | ||
|
||
CACHE_FOLDER = path; | ||
DB_PATH = rs.getString("db_path"); | ||
|
||
DB_PATH = rs.getString("db_path"); | ||
PORT = Integer.parseInt(rs.getString("port")); | ||
|
||
PORT = Integer.parseInt(rs.getString("port")); | ||
File f = new File(CACHE_FOLDER); | ||
if (!f.exists()) { | ||
f.mkdirs(); | ||
} | ||
|
||
File f = new File(CACHE_FOLDER); | ||
if (!f.exists()) { | ||
f.mkdirs(); | ||
} | ||
SALT = rs.getString("salt"); | ||
|
||
SALT = rs.getString("salt"); | ||
|
||
logger.info("DB_PATH:{}", DB_PATH); | ||
logger.info("Cache folder:{}", CACHE_FOLDER); | ||
logger.info("Port", PORT); | ||
} | ||
logger.info("DB_PATH:{}", DB_PATH); | ||
logger.info("Cache folder:{}", CACHE_FOLDER); | ||
logger.info("Port", PORT); | ||
} | ||
} |