Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
comp-backup
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ITS
comp-backup
Commits
f992d838
Commit
f992d838
authored
3 weeks ago
by
efer
Browse files
Options
Downloads
Patches
Plain Diff
post macOS install - script editor launch
parent
ac91240b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
comp-backup-install.sh
+24
-5
24 additions, 5 deletions
comp-backup-install.sh
with
24 additions
and
5 deletions
comp-backup-install.sh
+
24
−
5
View file @
f992d838
...
...
@@ -642,8 +642,6 @@ cat > $UNIT_DIR/local.comp-backup.plist << EOF
</plist>
EOF
launchctl load
$UNIT_DIR
/local.comp-backup.plist &>/dev/null
launchctl kickstart gui/
$(
id
-u
)
/local.comp-backup
fi
elif
[
$SYSTEMD
=
1
]
;
then
if
[
-f
$UNIT_DIR
/
$SCRIPTNAME
-
$RUSER
.timer
]
;
then
...
...
@@ -683,8 +681,29 @@ fi
echo
-e
"[backup script]"
$G_
"Installed"
$_N
#
# macOS specific post-install
#
if
[
$HOST_OS
=
'Darwin'
]
;
then
echo
-e
$Y_
"
\n
NOTE:"
$_N
"The setup will now prepare your Mac to show notifications from the backup script"
echo
-e
"as well as doing a first run of the backup script so you can grant access permissions manually
\n
"
read
-p
$'Press Enter/Return to start the Script Editor - Please click the "Play" button to display a notification
Allow the Script Editor to show notifications in the Notification Center
Optionally click the "Play" button again to verify
\n
'
echo
'display notifcation "Allow to show notifications from scripts"'
>
/tmp/notification.applescript
open
-a
'Script Editor'
/tmp/notification.applescript
read
-rp
$'Please grant "rclone" access to Documents and Desktop folders when promted during the initial backup
Depending on how much data you already have, the initial backup can take a while
Do you want to run a backup now or postpone it for later? (y/n) [y] '
initialbackup
if
[[
$initialbackup
==
"y"
]]
;
then
launchctl load
$UNIT_DIR
/local.comp-backup.plist &>/dev/null
launchctl kickstart gui/
$(
id
-u
)
/local.comp-backup
fi
#
# Finish
#
echo
-e
"
\n
DTU Compute backup script can be started manually with the command: "
$G_
"comp-backup"
$_N
echo
-e
" Start it from a new terminal session for the first time
\n
"
echo
-e
"
\n
DTU Compute backup script can be started manually with the command: "
$G_
"comp-backup
\n
"
$_N
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment