I have a script I want to run when the nas is on battery power.
How do I run the following script only on shutdown.
I am using a cp1500pfclcda on the approved list.
This script works standalone, everything shuts down the ups turns off.
When power is restored to the UPS everything powers up correctly.
file name in system: upsshutdown.sh and it is marked executable
#!/bin/bash
# Allow time to shutdown all systems.
upscmd -u username -p password ups load.off.delay 300
upscmd -u username -p password ups load.on.delay 300
# Shutdown Windows 11 Office computer, do not wait
net rpc shutdown -I 192.168.1.124 -U username%password
# Shutdown Windows 11 Gaming computer, do not wait
net rpc shutdown -I 192.168.1.141 -U username%password
# Now shutdown the nas
#shutdown -h "now
Any help will be appreciated.
Script to run only on ups shutdown
Discussion on apps, protocols, APIs, specifications, and more. You are welcome to join us as a TOS app developer!
Return to “Developer Discussion Room”
Jump to
- TerraMaster News
- ↳ News & Announcements
- ↳ News and Announcements
- ↳ Update Notice
- ↳ Community Events
- ↳ New and Key Features in TOS 6
- TOS/TNAS
- ↳ FAQ & User Guides
- ↳ Initialization & Installation
- ↳ System Configuration
- ↳ File Service
- ↳ Networking
- ↳ Storage
- ↳ Backup & Restore
- ↳ Hardware
- ↳ Applications
- ↳ TOS Issues Report
- ↳ Initialization
- ↳ System Update
- ↳ System Configuration
- ↳ Privileges
- ↳ File Services
- ↳ Network
- ↳ Storage
- ↳ System Resources
- ↳ Compatibility
- ↳ Hardware, Power and Accessories
- ↳ Security
- ↳ Mobile Apps and Desktop Clients
- ↳ Data Backup
- ↳ How to back up? Which one is right for me?
- ↳ TerraSync
- ↳ Centralized Backup
- ↳ Duple Backup
- ↳ CloudSync
- ↳ Snapshot
- ↳ TFSS
- ↳ USB Copy
- ↳ TFM Backup
- ↳ Rsync
- ↳ Time Machine
- ↳ Multimedia
- ↳ DLNA/Multimedia Services
- ↳ Multimedia Server
- ↳ Photos
- ↳ Plex Media Server
- ↳ Emby Media Server
- ↳ Jellyfin Media Server
- ↳ Virtualization
- ↳ Docker
- ↳ Virtual Machines
- ↳ Applications
- ↳ iSCSI Target
- ↳ Surveillance Manager
- ↳ VPN Server
- ↳ Download
- ↳ Web Server/PHP/MySQL/MariaDB
- ↳ Terra Search
- ↳ API-in-a-Box (Powered by GenAI Logic™)
- ↳ Others
- ↳ Feature Requests & Enhancement Proposals
- ↳ New Requests & Proposals
- ↳ Accepted
- ↳ Scheduled
- ↳ Released
- ↳ Discussion & Sharing
- ↳ Developer Discussion Room
- ↳ Community-Created Guides
- ↳ Lounge and Boast
- TDAS (TerraMaster DAS)
- ↳ FAQ & User Guides
- ↳ Thunderbolt Series
- ↳ USB Series
- ↳ Issues Report
- ↳ Thunderbolt Series
- ↳ USB Series
