Fix env and address

This commit is contained in:
Adrian Woźniak 2024-06-14 12:50:00 +02:00
parent 272d950bae
commit ea95298b0f
3 changed files with 3 additions and 4 deletions

View File

@ -11,7 +11,7 @@ async fn main() {
let server_address = if cfg!(debug_assertions) { let server_address = if cfg!(debug_assertions) {
"0.0.0.0:50002" "0.0.0.0:50002"
} else { } else {
"https://mods.7dtd.ita-prog.pl" "mods.7dtd.ita-prog.pl:443"
}; };
tracing::debug!("Server address: {server_address}"); tracing::debug!("Server address: {server_address}");

View File

@ -9,7 +9,7 @@ RestartSec=4
ExecStart=/usr/bin/sync-7dtd-server ExecStart=/usr/bin/sync-7dtd-server
Environment=RUST_LOG=ERROR Environment=RUST_LOG=ERROR
Environment=7DTD_MODS_DIR=/home/7dtd/server/Mods Environment=MODS_DIR=/home/7dtd/server/Mods
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -10,8 +10,7 @@ use tokio::time::sleep;
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
tracing_subscriber::fmt::init(); tracing_subscriber::fmt::init();
let dir = PathBuf::new() let dir = PathBuf::new().join(std::env::var("MODS_DIR").expect("MODS_DIR must be provided"));
.join(std::env::var("7DTD_MODS_DIR").expect("7DTD_MODS_DIR must be provided"));
tracing::debug!("Mods directory: {dir:?}"); tracing::debug!("Mods directory: {dir:?}");