Skip to content
Snippets Groups Projects
Forked from DM / dm-docs
261 commits behind, 832 commits ahead of the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
dm_sync_aps_user_accounts.sh 551 B
#!/bin/sh

#
# Script used for syncing APS user accounts

# Usage:
#
#   $0 
#

CURRENT_DIR=`pwd`
MY_DIR=`dirname $0` && cd $MY_DIR && MY_DIR=`pwd`
cd $CURRENT_DIR
DM_ROOT_DIR=$MY_DIR/..
DM_ENV_FILE=${DM_ROOT_DIR}/setup.sh
if [ ! -f ${DM_ENV_FILE} ]; then
    echo "Environment file ${DM_ENV_FILE} does not exist." 
    exit 2
fi
. ${DM_ENV_FILE} > /dev/null 
DM_CONFIG_FILE=$DM_ROOT_DIR/../etc/dm.aps-user-update-utilities.conf

# Simply run update command after sourcing setup file
dm-update-users-from-aps-db --config-file=$DM_CONFIG_FILE --quiet