File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 200
200
ghe-backup-store-version ||
201
201
echo " Warning: storing backup-utils version remotely failed."
202
202
203
+ # Stop cron and timerd, as scheduled jobs may disrupt the restore process.
204
+ if [ " $GHE_VERSION_MAJOR " -ge 2 ]; then
205
+ if $cluster ; then
206
+ ghe-ssh " $GHE_HOSTNAME " -- " ghe-cluster-each -- sudo service cron stop"
207
+ ghe-ssh " $GHE_HOSTNAME " -- " ghe-cluster-each -- sudo service github-timerd stop"
208
+ else
209
+ ghe-ssh " $GHE_HOSTNAME " -- " sudo service cron stop"
210
+ ghe-ssh " $GHE_HOSTNAME " -- " sudo service github-timerd stop"
211
+ fi
212
+ fi
213
+
203
214
# Restore settings and license if restoring to an unconfigured appliance or when
204
215
# specified manually.
205
216
if $restore_settings ; then
@@ -323,6 +334,15 @@ elif $instance_configured; then
323
334
fi
324
335
fi
325
336
337
+ # Start cron. Timerd will start automatically as part of the config run.
338
+ if [ " $GHE_VERSION_MAJOR " -ge 2 ]; then
339
+ if $cluster ; then
340
+ ghe-ssh " $GHE_HOSTNAME " -- " ghe-cluster-each -- sudo service cron start"
341
+ else
342
+ ghe-ssh " $GHE_HOSTNAME " -- " sudo service cron start"
343
+ fi
344
+ fi
345
+
326
346
# Update the remote status to "complete". This has to happen before importing
327
347
# ssh host keys because subsequent commands will fail due to the host key
328
348
# changing otherwise.
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ # Fake service command for tests.
3
+ true
You can’t perform that action at this time.
0 commit comments