aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/TelegramBotManager.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPConnection.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Post.java4
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/Settings.java4
5 files changed, 7 insertions, 7 deletions
diff --git a/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java b/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
index bcce56ca..de8b256e 100644
--- a/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
+++ b/juick-server-jdbc/src/main/java/com/juick/service/MessagesServiceImpl.java
@@ -61,7 +61,7 @@ public class MessagesServiceImpl extends BaseJdbcService implements MessagesServ
private SearchService searchService;
@Inject
private ImagesService imagesService;
- @Value("${img_path:/var/www/juick.com/i/}")
+ @Value("${img_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
private String imgDir;
@Value("${img_url:https://i.juick.com/}")
private String baseImagesUrl;
diff --git a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java
index b264d080..697f6dd1 100644
--- a/juick-server/src/main/java/com/juick/server/TelegramBotManager.java
+++ b/juick-server/src/main/java/com/juick/server/TelegramBotManager.java
@@ -82,7 +82,7 @@ public class TelegramBotManager implements ApplicationListener<MessageEvent> {
private UserService userService;
@Inject
private ServerManager serverManager;
- @Value("${upload_tmp_dir:/var/www/juick.com/i/tmp/}")
+ @Value("${upload_tmp_dir:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
private String tmpDir;
private static final String MSG_LINK = "🔗";
diff --git a/juick-server/src/main/java/com/juick/server/XMPPConnection.java b/juick-server/src/main/java/com/juick/server/XMPPConnection.java
index 967f5c47..ae7ba252 100644
--- a/juick-server/src/main/java/com/juick/server/XMPPConnection.java
+++ b/juick-server/src/main/java/com/juick/server/XMPPConnection.java
@@ -88,7 +88,7 @@ public class XMPPConnection implements AutoCloseable {
private int componentPort;
@Value("${xmpp_password:secret}")
private String password;
- @Value("${upload_tmp_dir:/tmp}")
+ @Value("${upload_tmp_dir:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
private String tmpDir;
@Inject
diff --git a/juick-server/src/main/java/com/juick/server/api/Post.java b/juick-server/src/main/java/com/juick/server/api/Post.java
index 8e11089b..cb2476c7 100644
--- a/juick-server/src/main/java/com/juick/server/api/Post.java
+++ b/juick-server/src/main/java/com/juick/server/api/Post.java
@@ -71,9 +71,9 @@ public class Post {
private MessagesService messagesService;
@Inject
private SubscriptionService subscriptionService;
- @Value("${upload_tmp_dir:/var/www/juick.com/i/tmp/}")
+ @Value("${upload_tmp_dir:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
private String tmpDir;
- @Value("${img_path:/var/www/juick.com/i/}")
+ @Value("${img_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
private String imgDir;
@RequestMapping(value = "/post", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
diff --git a/juick-www/src/main/java/com/juick/www/controllers/Settings.java b/juick-www/src/main/java/com/juick/www/controllers/Settings.java
index 5eb36b36..a1d58ada 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/Settings.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/Settings.java
@@ -59,9 +59,9 @@ import java.util.stream.IntStream;
public class Settings {
private static final Logger logger = LoggerFactory.getLogger(Settings.class);
- @Value("${img_path:/var/www/juick.com/i/}")
+ @Value("${img_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
private String imgDir;
- @Value("${upload_tmp_dir:/var/www/juick.com/i/tmp/}")
+ @Value("${upload_tmp_dir:#{systemEnvironment['TEMP'] ?: '/tmp'}}")
private String tmpDir;
@Inject
private TagService tagService;