Skip to content

Commit 44d6d38

Browse files
committed
Shorter create-image-from-s3
1 parent eda720c commit 44d6d38

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

examples/create-image-from-s3.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@ echo "[+] Target name: ${NAME}"
2424

2525

2626
echo "[+] Creating new server in rescue mode with a secondary volume..."
27-
SERVER=$(scw create --bootscript=rescue --volume="${VOLUME_SIZE}" --env="AUTHORIZED_KEY=${KEY}" --name="image-writer-${NAME}" 1GB)
27+
SERVER=$(scw run -d --bootscript=rescue --volume="${VOLUME_SIZE}" --env="AUTHORIZED_KEY=${KEY}" --name="image-writer-${NAME}" 1GB)
2828
echo "[+] Server created: ${SERVER}"
2929

3030

3131
echo "[+] Booting..."
32-
scw start --wait --timeout=600 "${SERVER}" >/dev/null
33-
#IP=$(scw inspect -f .server.public_ip.address "${SERVER}")
34-
#echo "[+] SSH is ready (${IP})"
32+
scw exec -w "${SERVER}" 'uname -a'
3533
echo "[+] Server is booted"
36-
scw exec "${SERVER}" 'uname -a'
3734

3835

3936
echo "[+] Formating and mounting /dev/nbd1..."

0 commit comments

Comments
 (0)