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
- GENERAL
- ↳ News & Announcements
- ↳ Know More About TOS 5
- ↳ Know More About TOS 6
- ↳ Lounge and Boast
- TNAS (TerraMaster NAS)
- ↳ FAQ & User Guides
- ↳ Initialization & installation
- ↳ System Configuration
- ↳ File Service
- ↳ Networking
- ↳ Storage
- ↳ Backup & restore
- ↳ Hardware
- ↳ Applications
- ↳ Update Notice
- ↳ TOS
- ↳ Initialization
- ↳ System Update
- ↳ System Configuration
- ↳ Privileges
- ↳ Network & Remote Access
- ↳ File Services
- ↳ Storage
- ↳ Compatibility
- ↳ System Resources
- ↳ Security
- ↳ Mobile Apps and Desktop Clients
- ↳ Data Backup
- ↳ How to back up? Which one is right for me?
- ↳ TerraSync
- ↳ Centralized Backup
- ↳ Duple Backup
- ↳ USB Copy
- ↳ Snapshot
- ↳ CloudSync
- ↳ TFM Backup
- ↳ TFSS
- ↳ Rsync
- ↳ Time Machine
- ↳ Multimedia
- ↳ DLNA/Multimedia Services
- ↳ Multimedia Server
- ↳ Terra Photos
- ↳ Plex
- ↳ Emby
- ↳ Jellyfin
- ↳ Virtualization
- ↳ Docker
- ↳ Virtual Machines
- ↳ Other Applications
- ↳ iSCSI Target
- ↳ Surveillance Manager
- ↳ VPN Server
- ↳ Download
- ↳ Web Server/PHP/MySQL/MariaDB
- ↳ Terra Search
- ↳ Others
- ↳ New Features Wanted
- ↳ Developer Discussion Room
- ↳ Hardware, Power and Accessories
- TDAS (TerraMaster DAS)
- ↳ FAQ & User Guides
- ↳ Thunderbolt 3 Series
- ↳ USB Series
- ↳ Thunderbolt 3 Series
- ↳ USB Series