File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/packages/server/compute/cloud Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -58,14 +58,23 @@ ${ephemeral}
58
58
content: |
59
59
#!/bin/bash
60
60
${ await startupScriptViaApi ( { compute_server_id, api_key } ) }
61
+ if [ $? -eq 0 ]; then
62
+ exit 0
63
+ fi
61
64
# If the script fails (e.g., due to timing weirdness), we
62
65
# try restarting docker and running it again.
63
66
sleep 1
64
67
service docker restart
65
68
${ await startupScriptViaApi ( { compute_server_id, api_key } ) }
69
+ if [ $? -eq 0 ]; then
70
+ exit 0
71
+ fi
66
72
sleep 3
67
73
service docker restart
68
74
${ await startupScriptViaApi ( { compute_server_id, api_key } ) }
75
+ if [ $? -eq 0 ]; then
76
+ exit 0
77
+ fi
69
78
70
79
runcmd:
71
80
- |
@@ -244,6 +253,9 @@ exec /usr/bin/python3 -u /cocalc/disk_enlarger.py 2> /var/log/cocalc-disk-enlarg
244
253
245
254
exec /usr/bin/python3 -u /cocalc/check_in.py ${ CHECK_IN_PERIOD_S } 2> /var/log/cocalc-check-in.err >/var/log/cocalc-check-in.log &
246
255
256
+ # Put back unattended upgrades, since they are good to have for security reasons.
257
+ apt-get install -y unattended-upgrades || true
258
+
247
259
echo "Startup complete!"
248
260
` ;
249
261
}
You can’t perform that action at this time.
0 commit comments