Skip to content

Instantly share code, notes, and snippets.

@hartmut-co-uk
Last active October 4, 2021 18:49
Show Gist options
  • Save hartmut-co-uk/d7952b0d19f00182af727cf806434d07 to your computer and use it in GitHub Desktop.
Save hartmut-co-uk/d7952b0d19f00182af727cf806434d07 to your computer and use it in GitHub Desktop.
AppleScript to shutdown / halt QNAP NAS (macOS Automator)
### AppleScript to shutdown / halt QNAP NAS
# requires pub-key access to QNAP setup for current user...
# [https://wiki.qnap.com/wiki/SSH:_How_To_Set_Up_Authorized_Keys]
tell application "Terminal"
set currentTab to do script ("ssh qnap halt;")
end tell
# Note: Using Mac OS 'Automator' it's easy to create a QHalt.app
# Steps:
# 1. Start Automator, new document 'Application'
# 2. Add Action 'Run AppleScript'
# 3. Paste the content of this file
# 4. Save as Application QHalt.app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment