run certain scripts periodically
[monitor.git] / rt3 / rtcron.d / syncadmins.sh
diff --git a/rt3/rtcron.d/syncadmins.sh b/rt3/rtcron.d/syncadmins.sh
new file mode 100644 (file)
index 0000000..8009a18
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+echo "syncadmins.sh"
+MDIR=/usr/share/monitor
+source $MDIR/monitorconfig.sh
+${MONITOR_SCRIPT_ROOT}/plcquery.py --type person --withsitename --byrole admin \
+                                       --format="%(email)s,%(first_name)s %(last_name)s,%(name)s" \
+                               | ${MONITOR_SCRIPT_ROOT}/rt3/adduserstort.pl priv -