Add copyparty.sh
This commit is contained in:
parent
b2fef707c3
commit
960d4fd877
36
copyparty.sh
Normal file
36
copyparty.sh
Normal file
|
|
@ -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
|
||||
Loading…
Reference in a new issue