From 4599ed0b068072fa3db044d62b4c0976b46633f3 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Fri, 1 Aug 2025 21:25:30 -0400 Subject: [PATCH] reuse standard temporary file name --- .gitignore | 1 - deploy-initial | 16 ++++++++-------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 0236ae4..1a72c11 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ /tmp /units/ /logs/ -*.tmp /ovh-mitigation.json /ovh-mitigation.txt /venv/ diff --git a/deploy-initial b/deploy-initial index dc2f774..0340ecc 100755 --- a/deploy-initial +++ b/deploy-initial @@ -43,10 +43,10 @@ rsync etc/{crypttab,locale.conf,mkinitcpio.conf,pacman.conf,pacreport.conf,resol rsync etc/unbound/unbound.conf $remote:/mnt/etc/unbound/unbound.conf if [[ $host = @(0.grapheneos.network|1.grapheneos.network|2.grapheneos.network|3.grapheneos.network) ]]; then - cp etc/chrony.conf etc/chrony.conf.tmp - echo -e '\nallow' >> etc/chrony.conf.tmp - rsync etc/chrony.conf.tmp $remote:/mnt/etc/chrony.conf - rm etc/chrony.conf.tmp + cp etc/chrony.conf tmp + echo -e '\nallow' >> tmp + rsync tmp $remote:/mnt/etc/chrony.conf + rm tmp else rsync etc/chrony.conf $remote:/mnt/etc/chrony.conf fi @@ -54,10 +54,10 @@ ssh $remote mkdir -vp /mnt/etc/sysconfig rsync etc/sysconfig/chronyd $remote:/mnt/etc/sysconfig/chronyd rsync ${hosts_authorized_keys[$host]:-authorized_keys} $remote:/mnt/root/.ssh/authorized_keys -cp etc/ssh/sshd_config etc/ssh/sshd_config.tmp -sed -i "s/{{ssh_users}}/${hosts_ssh_users[$host]:-root}/g" etc/ssh/sshd_config.tmp -rsync etc/ssh/sshd_config.tmp $remote:/mnt/etc/ssh/sshd_config -rm etc/ssh/sshd_config.tmp +cp etc/ssh/sshd_config tmp +sed -i "s/{{ssh_users}}/${hosts_ssh_users[$host]:-root}/g" tmp +rsync tmp $remote:/mnt/etc/ssh/sshd_config +rm tmp synproxy_threshold=$(( ${hosts_conntrack_size[$host]} / 64 )) sed "s/{{synproxy_threshold}}/$synproxy_threshold/g" etc/nftables/nftables-${hosts_firewall[$host]:-web}.conf >tmp