sidewindow

This commit is contained in:
Robin Appelman 2026-05-04 00:47:33 +02:00
commit 3f25246f39

View file

@ -149,26 +149,27 @@ async fn setup(
ssh.exec("apt-get -qq --yes --force-yes purge unattended-upgrades") ssh.exec("apt-get -qq --yes --force-yes purge unattended-upgrades")
.await?; .await?;
info!("setting up prometheus"); info!("setting up sidewindow");
ssh.exec("wget https://github.com/icewind1991/palantir/raw/main/palantir.service -O /etc/systemd/system/palantir.service").await?;
ssh.exec("wget https://github.com/icewind1991/palantir/releases/download/v1.1.0/palantir-x86_64-unknown-linux-musl -O /usr/local/bin/palantir").await?;
ssh.exec("chmod +x /usr/local/bin/palantir").await?;
ssh.exec( ssh.exec(
r#"sed -i -e "s|User=palantir|DynamicUser=true|" /etc/systemd/system/palantir.service"#, "wget https://codeberg.org/icewind/sidewindow/raw/main/sidewindow.service -O /etc/systemd/system/sidewindow.service \
) && wget https://codeberg.org/icewind/sidewindow/releases/download/v1.4.0/x86_64-unknown-linux-musl -O /usr/local/bin/sidewindow \
.await?; && chmod +x /usr/local/bin/sidewindow \
&& sed -i -e 's/User=sidewindow/DynamicUser=true/' /etc/systemd/system/sidewindow.service
").await?;
ssh.exec("iptables -I INPUT -p tcp --dport 5665 -j ACCEPT") ssh.exec("iptables -I INPUT -p tcp --dport 5665 -j ACCEPT")
.await?; .await?;
if let Some(hostname) = hostname { if let Some(hostname) = hostname {
ssh.exec(&format!( ssh.exec(&format!(
"hostname {} && systemctl start palantir", "hostname {} && systemctl start sidewindow",
hostname hostname
)) ))
.await?; .await?;
} else { } else {
ssh.exec("systemctl start palantir").await?; ssh.exec("systemctl start sidewindow").await?;
} }
info!("setup done");
Ok(()) Ok(())
} }