Skip to content
Snippets Groups Projects
Commit f992d838 authored by efer's avatar efer
Browse files

post macOS install - script editor launch

parent ac91240b
No related branches found
No related tags found
No related merge requests found
......@@ -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_"\nNOTE:"$_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 "\nDTU 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 "\nDTU Compute backup script can be started manually with the command: "$G_"comp-backup\n"$_N
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment