Skip to content
Snippets Groups Projects
Commit 522ab1c1 authored by Bob Mottram's avatar Bob Mottram
Browse files

Fix rsync daemon

parent 93a65db0
No related branches found
No related tags found
No related merge requests found
...@@ -186,9 +186,12 @@ function install_rsync { ...@@ -186,9 +186,12 @@ function install_rsync {
echo "port = $RSYNC_PORT"; echo "port = $RSYNC_PORT";
echo 'max connections = 2'; echo 'max connections = 2';
echo 'fake super = yes'; echo 'fake super = yes';
echo 'use chroot = true';
echo 'uid = rsync';
echo 'gid = rsync';
echo ''; echo '';
echo '[files]'; echo '[files]';
echo 'hosts allow = 192.168.0.0/16;10.0.0.0/16'; echo 'hosts allow = 192.168.0.0/16,10.0.0.0/16';
echo 'hosts deny = *'; echo 'hosts deny = *';
echo 'list = true'; echo 'list = true';
echo "path = $RSYNC_DATA"; echo "path = $RSYNC_DATA";
...@@ -211,20 +214,18 @@ function install_rsync { ...@@ -211,20 +214,18 @@ function install_rsync {
echo 'Description=rsync'; echo 'Description=rsync';
echo 'After=syslog.target'; echo 'After=syslog.target';
echo 'After=network.target'; echo 'After=network.target';
echo "Documentation=$RSYNC_REPO"; echo 'ConditionPathExists=/etc/rsync/rsyncd.conf';
echo ''; echo '';
echo '[Service]'; echo '[Service]';
echo 'Type=simple'; echo 'Type=simple';
echo 'User=rsync';
echo 'Group=rsync';
echo "WorkingDirectory=$RSYNC_DATA"; echo "WorkingDirectory=$RSYNC_DATA";
echo 'ExecStart=/usr/bin/rsync --config=/etc/rsync/rsyncd.conf --bwlimit=100K --daemon'; echo 'ExecStart=/usr/bin/rsync --config=/etc/rsync/rsyncd.conf --bwlimit=100 --daemon --no-detach';
echo 'Environment=USER=rsync'; echo 'Environment=USER=rsync';
echo 'Restart=always'; echo 'Restart=always'
echo 'StandardError=syslog'; echo 'StandardError=syslog';
echo ''; echo '';
echo '[Install]'; echo '[Install]';
echo 'WantedBy=multi-user.target'; } > "/etc/systemd/system/rsync.service" echo 'WantedBy=multi-user.target'; } > /etc/systemd/system/rsync.service
increment_app_install_progress increment_app_install_progress
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment