From 960d4fd8772b4cf43238ae7a37e8243045e9fcbe Mon Sep 17 00:00:00 2001 From: Filip Date: Sat, 31 Jan 2026 13:07:57 +0100 Subject: [PATCH] Add copyparty.sh --- copyparty.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 copyparty.sh diff --git a/copyparty.sh b/copyparty.sh new file mode 100644 index 0000000..e739bd4 --- /dev/null +++ b/copyparty.sh @@ -0,0 +1,36 @@ +#!/bin/bash +useradd -m copyparty +cd /home/copyparty +su -c 'wget https://github.com/9001/copyparty/releases/latest/download/copyparty-sfx.py' copyparty + +echo '[Unit] +Description=Copyparty +After=network.target + +[Service] +Type=simple +ExecStart=python3 /home/copyparty/copyparty-sfx.py -c /home/copyparty/copyparty.conf +WorkingDirectory=/home/copyparty +User=copyparty +Restart=always + +[Install] +WantedBy=multi-user.target' > "/etc/systemd/system/copyparty.service" + +echo '[global] + p: 8086, 3939 # listen on ports 8086 and 3939 + e2dsa # enable file indexing and filesystem scanning + e2ts # and enable multimedia indexing + z, qr # and zeroconf and qrcode (you can comma-separate arguments) + +[accounts] + admin: '"$(openssl rand -hex 32)"' + +[/private] + ./private + accs: + A: admin +' > "/home/copyparty/copyparty.conf" + +systemctl enable copyparty +systemctl start copyparty \ No newline at end of file