> setcfg LOGIN "SSH AllowTcpForwarding" TRUE
Reboot or go into UI and update the SSH Service
> vi /etc/config/crontab
> crontab /etc/config/crontab && /etc/init.d/crond.sh restart
> /etc/init.d/init_disk.sh mount_flash_config
> vi /tmp/nasconfig_tmp/autorun.s
> /etc/init.d/init_disk.sh umount_flash_config
Verify that your changes are saved by verifying in the UI
Plug UPS into USB port.
From the QNAP UI, navigate to Control Panel → External Devices
Configure as follows:
Edit the configuration
$ sudo vi /etc/apcupsd/apcupsd.conf |
Set the following values
UPSCABLE ether UPSTYPE net #DEVICE <masterIP>:<port> DEVICE 192.168.1.50:3551 # If during a power failure, the remaining battery percentage # (as reported by the UPS) is below or equal to BATTERYLEVEL, # apcupsd will initiate a system shutdown. BATTERYLEVEL 50 # If during a power failure, the remaining runtime in minutes # (as calculated internally by the UPS) is below or equal to MINUTES, # apcupsd, will initiate a system shutdown. MINUTES 10 |
Start apcupsd
$ apcupsd |
Test local configuration
$ apcaccess status APC : 001,036,0917 DATE : 2021-08-23 16:05:50 -0400 HOSTNAME : nas0 VERSION : 3.14.10 (13 September 2011) debian UPSNAME : MehanUPS CABLE : Ethernet Link DRIVER : Back-UPS ES 750 UPSMODE : Stand Alone STARTTIME: 2021-08-23 16:01:50 -0400 MASTERUPD: 2021-08-23 16:05:50 -0400 MASTER : 192.168.1.50:3551 STATUS : ONLINE SLAVE LINEV : 121.0 Volts LOADPCT : 13.0 Percent Load Capacity BCHARGE : 100.0 Percent TIMELEFT : 13.6 Minutes MBATTCHG : 0 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds SENSE : Medium LOTRANS : 092.0 Volts HITRANS : 139.0 Volts BATTV : 13.6 Volts LASTXFER : Low line voltage NUMXFERS : 0 TONBATT : 0 seconds CUMONBATT: 0 seconds XOFFBATT : N/A SELFTEST : NO STATFLAG : 0x07000408 Status Flag SERIALNO : 5B1036T73179 BATTDATE : 2010-09-05 NOMINV : 120 Volts NOMBATTV : 12.0 Volts NOMPOWER : 450 Watts FIRMWARE : 841.I3 .D USB FW:I3 END APC : 2021-08-23 16:06:39 -0400 |
Set APCUPSD to start at bootup
Mount the flash
$ /etc/init.d/init_disk.sh mount_flash_config |
Edit the autorun.sh script
$ vi /tmp/nasconfig_tmp/autorun.sh |
Add apcupsd to run
/sbin/apcupsd |
Unmount the flash
$ /etc/init.d/init_disk.sh umount_flash_config |