| ad-sync | ||
| debug | ||
| teams-sync | ||
| README.md | ||
| rsync-exclude-list | ||
Bash scripts to sync shares
All scripts create prometheus metrics, using the textfile-collector.
Ensure the folder /var/lib/node_exporter/ exists, and the textfile-collector
is configure for node-exporter, otherwise no metrics are created
AD sync
This share is only available within the VPN, so the script connects to the VPN, mounts the share, syncs the current semester (with some exclude regarding size and file ending), and then unmounts the share and kills the VPN connection.
Teams sync
This is a bit more complicated as FHNW doesn't allow any one-drive clients on linux, thus the script is split into two parts.
windows-sync.bat
This should be run on a windows machine and copies all files from a given directory, to a mounted share. To add a new module to be synced, it's necessary to include the folders in the one-drive sync on the host.
Usually it works best, if you open the fileshare in sharepoint (using the link in teams), and setup the sync from there.
onedrive-sync.sh
This script needs to be run on a linux machine. The machine needs to have the same share mounted as the windows VM, as well as the target share also required for the AD sync.
For each folder to be synced, a new entry needs to be created, ideally using a
Team-sync subfolder in the usual module directory.