Update shm_actions_script.sh
This commit is contained in:
parent
72f57cca00
commit
631d38fabf
@ -43,15 +43,15 @@ case $EVENT in
|
|||||||
;;
|
;;
|
||||||
CREATE)
|
CREATE)
|
||||||
echo "Create new user"
|
echo "Create new user"
|
||||||
$AWG_MANAGER -u "{{ us.id }}" -c
|
USER_CFG=$($AWG_MANAGER -u "{{ us.id }}" -c -p)
|
||||||
echo "Upload user key to SHM"
|
echo "Upload user key to SHM"
|
||||||
curl -s -XPUT \
|
curl -s -XPUT \
|
||||||
-H "session-id: $SESSION_ID" \
|
-H "session-id: $SESSION_ID" \
|
||||||
-H "Content-Type: text/plain" \
|
-H "Content-Type: text/plain" \
|
||||||
$API_URL/shm/v1/storage/manage/conf_{{ us.id }} \
|
$API_URL/shm/v1/storage/manage/conf_{{ us.id }} \
|
||||||
--data-binary "@$CONF_DIR/keys/{{ us.id }}/{{ us.id }}.conf"
|
--data-binary "$USER_CFG"
|
||||||
sleep 1
|
sleep 1
|
||||||
ENCODE=$(python3 $CONF_DIR/encode.py {{ us.id }})
|
ENCODE=$(cat $CONF_DIR/keys/{{ us.id }}/{{ us.id }}.vpn)
|
||||||
curl -sk -XPUT \
|
curl -sk -XPUT \
|
||||||
-H "session-id: $SESSION_ID" \
|
-H "session-id: $SESSION_ID" \
|
||||||
-H "Content-Type: text/plain" \
|
-H "Content-Type: text/plain" \
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user