-
Notifications
You must be signed in to change notification settings - Fork 1
/
install-user.sh
executable file
·31 lines (24 loc) · 1.1 KB
/
install-user.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
#
# Create local user
#
if [[ $CKAN_ROLE == 'registry' ]]; then
# create member user
printf "${SPACER}${Cyan}${INDENT}Create default user${NC}${SPACER}"
ckan -c $REGISTRY_CONFIG user add user_local email=temp+user@tbs-sct.gc.ca password=12345678
# create system admin
printf "${SPACER}${Cyan}${INDENT}Create system admin user${NC}${SPACER}"
ckan -c $REGISTRY_CONFIG user add admin_local email=temp@tbs-sct.gc.ca password=12345678
ckan -c $REGISTRY_CONFIG sysadmin add admin_local password=12345678 email=temp@tbs-sct.gc.ca
elif [[ $CKAN_ROLE == 'portal' ]]; then
# create member user
printf "${SPACER}${Cyan}${INDENT}Create default user${NC}${SPACER}"
ckan -c $PORTAL_CONFIG user add user_local email=temp+user@tbs-sct.gc.ca password=12345678
# create system admin
printf "${SPACER}${Cyan}${INDENT}Create system admin user${NC}${SPACER}"
ckan -c $PORTAL_CONFIG user add admin_local email=temp@tbs-sct.gc.ca password=12345678
ckan -c $PORTAL_CONFIG sysadmin add admin_local password=12345678 email=temp@tbs-sct.gc.ca
fi
# END
# Create local user
# END