Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
#!/bin/sh
export PGPASSWORD=xxxxxx
psql mobility -c "select userid,tstamp,devicetype,identifierstring from devices order by userid;" -U datasync_user -H -o /tmp/devices.html
scp /tmp/devices.html user@hostname.com:/srv/www/htdocs
Note: If running 1.2.5 use the line below.
psql mobility -c "SELECT name,tstamp,devicetype,identifierstring FROM devices, users WHERE devices.userid=guid order by name;" -U datasync_user -H -o /tmp/devices.html
*/15 * * * * /usr/local/sbin/devices.sh