10 lines
No EOL
380 B
Bash
Executable file
10 lines
No EOL
380 B
Bash
Executable file
#!/bin/sh
|
|
|
|
[ -d "/var/lib/sfbs" ] || mkdir -p /var/lib/sfbs
|
|
[ -f "/var/lib/sfbs/rsync-password" ] || openssl rand -hex 16 > /var/lib/sfbs/rsync-password
|
|
[ -f "/var/lib/sfbs/rsync-auth" ] || (echo "sfbs:$(cat /var/lib/sfbs/rsync-password)" > /var/lib/sfbs/rsync-auth)
|
|
|
|
cp ./etc/rsyncd.conf /etc/rsyncd.conf
|
|
|
|
chmod 600 /var/lib/sfbs/rsync-password
|
|
chmod 600 /var/lib/sfbs/rsync-auth |