Line 23: |
Line 23: |
| <ol><li>Create a storage location for mirror | | <ol><li>Create a storage location for mirror |
| mkdir -p {/path/to/your/data/store/} | | mkdir -p {/path/to/your/data/store/} |
− | </li><li>Create a new user to perform sync<br/>If you are running SME Server you can create the user through the server-manager panel, but you will need to enable bash as the shell for this user. | + | </li><li>Create a new user to perform sync<br/>If you are running SME Server you can create the user through the server-manager panel. |
− | db accounts setprop ''{user}'' Shell /bin/bash
| |
− | signal-event user-modify ''{user}''
| |
| </li><li>Now it is time to download the ftpsync script and all files it requires: | | </li><li>Now it is time to download the ftpsync script and all files it requires: |
| wget http://contribs.org/ftpsync.tgz | | wget http://contribs.org/ftpsync.tgz |
| </li><li>Extract the tarball in users directory | | </li><li>Extract the tarball in users directory |
| tar zxof ftpsync.tgz | | tar zxof ftpsync.tgz |
− | </li><li>Append the keys to the authorized_keys file of the user
| |
− | cat .ssh/pushmirror-*.pub >> .ssh/authorized_keys
| |
| </li><li>Change the ownership of the directories to the new user | | </li><li>Change the ownership of the directories to the new user |
| chown -R ''{user}'' bin etc log .ssh ''{/path/to/your/data/store/}'' | | chown -R ''{user}'' bin etc log .ssh ''{/path/to/your/data/store/}'' |
Line 66: |
Line 62: |
| =====Configuring for push===== | | =====Configuring for push===== |
| {{Incomplete}} | | {{Incomplete}} |
− | | + | <ol><li>, but you will need to enable bash as the shell for this user. |
| + | db accounts setprop ''{user}'' Shell /bin/bash |
| + | signal-event user-modify ''{user}'' |
| + | </li><li>Append the keys to the authorized_keys file of the user |
| + | cat .ssh/pushmirror-*.pub >> .ssh/authorized_keys |
| + | </li><ol> |
| =====Configuring for pull===== | | =====Configuring for pull===== |
| We prefer you configure your mirror to be setup as a push mirror, but if you can not do so or have other ways for not doing so you can just schedule a cron job to run every 2 hours that does the exact same sync command you do to get the mirror in the first place, you can add a comment like in the example below: | | We prefer you configure your mirror to be setup as a push mirror, but if you can not do so or have other ways for not doing so you can just schedule a cron job to run every 2 hours that does the exact same sync command you do to get the mirror in the first place, you can add a comment like in the example below: |