mirror of
https://codeberg.org/spire/dispenser.git
synced 2026-06-03 10:04:07 +02:00
sidewindow
This commit is contained in:
parent
6c9b7244a9
commit
3f25246f39
1 changed files with 10 additions and 9 deletions
19
src/main.rs
19
src/main.rs
|
|
@ -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(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue