{"id":56,"date":"2017-11-16T17:03:13","date_gmt":"2017-11-16T14:03:13","guid":{"rendered":"http:\/\/gsgt.ru\/?p=56"},"modified":"2019-04-25T16:35:27","modified_gmt":"2019-04-25T13:35:27","slug":"%d0%bd%d0%b0%d1%81%d1%82%d1%80%d0%be%d0%b9%d0%ba%d0%b0-nut-%d0%b2-ubuntu-14-04-%d0%bd%d0%b0-%d0%b0%d0%b2%d1%82%d0%be%d0%be%d1%82%d0%ba%d0%bb%d1%8e%d1%87%d0%b5%d0%bd%d0%b8%d0%b5-%d1%81%d0%b5%d1%80","status":"publish","type":"post","link":"https:\/\/gsgt.ru\/?p=56","title":{"rendered":"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 nut \u0432 Ubuntu 14.04 \u043d\u0430 \u0430\u0432\u0442\u043e\u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043d\u044e\u0430\u043d\u0441\u044b"},"content":{"rendered":"<p>\u0412 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u043e \u0438\u043d\u0444\u044b \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 nut, \u043d\u043e \u043d\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u044b \u043e\u0434\u043d\u0438 \u0438\u0437 \u0432\u0430\u0436\u043d\u044b\u0445 \u043d\u044e\u0430\u043d\u0441\u043e\u0432, \u0447\u0442\u043e \u0434\u0430 \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043e \u043d\u0438\u0445 \u044f \u0440\u0430\u0441\u043f\u0438\u0448\u0443 \u043f\u043e \u0445\u043e\u0434\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0418\u0411\u041f Ippon Back Power Pro 600 \u0447\u0435\u0440\u0435\u0437 USB. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c. \u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 root&#8217;\u043e\u043c.<\/p>\n<p>1) \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0430\u043c nut. <strong>apt install nut<\/strong><\/p>\n<p><em><strong>\u0412\u0430\u0436\u043d\u043e: \u0432 Ubuntu 14.04 (Trusty) \u0441\u0435\u0440\u0432\u0438\u0441 nut \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u0430\u043a nut-server, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e \u0441 \u044d\u0442\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c.<\/strong><\/em><\/p>\n<p>2) \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0438. \u0421\u043e\u0432\u0435\u0442\u0443\u044e \u043d\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0430 \u0442\u043e \u0433\u043b\u0430\u0437\u0430 \u043d\u0430 \u043b\u043e\u0431 \u0432\u044b\u043b\u0435\u0437\u0443\u0442, \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0438\u043a\u043e\u0433\u0434\u0430 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u043b\u0438 \ud83d\ude42<\/p>\n<p>2.05) <strong>\/etc\/nut\/nut.conf<\/strong><\/p>\n<p>MODE=none \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 MODE=standalone<\/p>\n<p>2.1) <strong>\/etc\/nut\/ups.conf<\/strong><\/p>\n<p><em><strong>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c:<\/strong><\/em><\/p>\n<p>[ups]<br \/>\ndriver = blazer_usb<br \/>\nport = auto<br \/>\noffdelay = 100<br \/>\nondelay = 1<br \/>\ndesc = &#171;Ippon 600W&#187; &#8212; <strong>\u0442\u0443\u0442 \u0432\u0430\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0434\u0432\u043e\u0439\u043d\u044b\u0435 \u043a\u0430\u0432\u044b\u0447\u043a\u0438.<\/strong><\/p>\n<p><em><strong>[ups] &#8212; \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0418\u0411\u041f (\u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435, \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438 \u0438 \u0432\u0430\u0436\u043d\u043e \u0435\u0433\u043e \u0437\u0430\u043f\u043e\u043c\u043d\u0438\u0442\u044c)<\/strong><\/em><\/p>\n<p><em><strong>driver = blazer_usb \u0438<\/strong><\/em><em><strong> port = auto &#8212; \u0438\u0445 \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u0435\u043c, \u044d\u0442\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0443\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u043e\u0440\u0442 (\u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0443\u0437\u043d\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 \u0434\u0440\u0430\u0439\u0432\u0435\u0440 <a href=\"http:\/\/networkupstools.org\/stable-hcl.html\">\u043f\u043e \u044d\u0442\u043e\u0439 \u0441\u0441\u044b\u043b\u043a\u0435<\/a>).<\/strong><\/em><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-74\" src=\"http:\/\/gsgt.ml\/wp-content\/uploads\/2017\/11\/Selection_014.png\" alt=\"\" width=\"1338\" height=\"667\" srcset=\"https:\/\/gsgt.ru\/wp-content\/uploads\/2017\/11\/Selection_014.png 1338w, https:\/\/gsgt.ru\/wp-content\/uploads\/2017\/11\/Selection_014-300x150.png 300w, https:\/\/gsgt.ru\/wp-content\/uploads\/2017\/11\/Selection_014-768x383.png 768w, https:\/\/gsgt.ru\/wp-content\/uploads\/2017\/11\/Selection_014-1024x510.png 1024w\" sizes=\"(max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/p>\n<p><em><strong>offdelay = 100 \u0438<\/strong><\/em><br \/>\n<em><strong> ondelay = 1 &#8212; \u043e \u043d\u0438\u0445 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432 \u043a\u043e\u043d\u0446\u0435<\/strong><\/em><\/p>\n<p>2.2) <strong>\/etc\/nut\/upsd.conf<\/strong><\/p>\n<p><strong><em>\u041d\u0430\u0439\u0434\u0435\u043c \u0437\u0434\u0435\u0441\u044c \u043b\u0438\u043d\u0438\u044e<\/em> LISTEN 127.0.0.1 3493 \u0438 \u0440\u0430\u0441\u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0435\u0451 (\u0438\u043b\u0438 \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430). \u042d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0433\u0434\u0435 \u0438 \u043d\u0430 \u043a\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u0442\u0443 nut \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 &#171;\u0441\u043b\u0443\u0448\u0430\u0442\u044c&#187;. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u043b\u043e\u043a\u0430\u043b\u0445\u043e\u0441\u0442\u0430.<\/strong><\/p>\n<p>2.3) <strong>\/etc\/nut\/upsd.users<\/strong><\/p>\n<p>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u044e\u0437\u0435\u0440\u0430. \u041f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c:<\/p>\n<p>[upsmon]<br \/>\npassword = pass<br \/>\nactions = SET<br \/>\ninstcmds = ALL<br \/>\nupsmon master<\/p>\n<p><strong>[upsmon] &#8212; \u0438\u043c\u044f \u044e\u0437\u0435\u0440\u0430, password &#8212; \u0435\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u044c. \u041d\u0430 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u043c, \u043f\u0440\u0438 \u0436\u0435\u043b\u0430\u043d\u0438\u0438, \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0433\u0443\u0433\u043b\u0438\u0442\u044c.<\/strong><\/p>\n<p>2.4) <strong>\/etc\/nut\/upsmon.conf<\/strong><\/p>\n<p>MONITOR ups@127.0.0.1 1 upsmon pass master<br \/>\nMINSUPPLIES 1<br \/>\nNOTIFYCMD \/sbin\/upssched<br \/>\nPOLLFREQ 5<br \/>\nPOLLFREQALERT 5<br \/>\nHOSTSYNC 15<br \/>\nDEADTIME 15<br \/>\nPOWERDOWNFLAG \/etc\/nut\/killpower<br \/>\nNOTIFYMSG ONLINE &#171;UPS %s on line power&#187;<br \/>\nNOTIFYMSG ONBATT &#171;UPS %s on battery&#187;<br \/>\nNOTIFYMSG LOWBATT &#171;UPS %s battery is low&#187;<br \/>\nNOTIFYMSG FSD &#171;UPS %s: forced shutdown in progress&#187;<br \/>\nNOTIFYMSG COMMOK &#171;Communications with UPS %s established&#187;<br \/>\nNOTIFYMSG COMMBAD &#171;Communications with UPS %s lost&#187;<br \/>\nNOTIFYMSG SHUTDOWN &#171;Auto logout and shutdown proceeding&#187;<br \/>\nNOTIFYMSG REPLBATT &#171;UPS %s battery needs to be replaced&#187;<br \/>\nNOTIFYMSG NOCOMM &#171;UPS %s is unavailable&#187;<br \/>\nNOTIFYMSG NOPARENT &#171;upsmon parent process died &#8212; shutdown impossible&#187;<br \/>\nNOTIFYFLAG ONLINE SYSLOG+WALL+EXEC<br \/>\nNOTIFYFLAG ONBATT SYSLOG+WALL+EXEC<br \/>\nNOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC<br \/>\nNOTIFYFLAG FSD SYSLOG+WALL+EXEC<br \/>\nNOTIFYFLAG COMMOK SYSLOG+WALL+EXEC<br \/>\nNOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC<br \/>\nNOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC<br \/>\nNOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC<br \/>\nNOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC<br \/>\nNOTIFYFLAG NOPARENT SYSLOG+WALL+EXEC<br \/>\nRBWARNTIME 43200<br \/>\nNOCOMMWARNTIME 300<br \/>\nFINALDELAY 5<\/p>\n<p><em><strong>\u0422\u0443\u0442 MONITOR ups@127.0.0.1 1 upsmon pass master<\/strong><\/em><\/p>\n<p><em><strong>\u0433\u0434\u0435<\/strong><\/em><\/p>\n<p><em><strong>ups@127.0.0.1 &#8212; ups &#8212; \u0438\u043c\u044f \u0431\u0435\u0441\u043f\u0435\u0440\u0435\u0431\u043e\u0439\u043d\u0438\u043a\u0430 (\u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u0430 2.1), 127.0.0.1 &#8212; \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u0430 2.2).<\/strong><\/em><\/p>\n<p><em><strong>upsmon &#8212; \u0438\u043c\u044f \u044e\u0437\u0435\u0440\u0430, pass &#8212; \u043f\u0430\u0440\u043e\u043b\u044c \u044e\u0437\u0435\u0440\u0430 (\u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u0430 2.3)<\/strong><\/em><\/p>\n<p>2.4) <strong>\/etc\/nut\/upssched.conf<\/strong><\/p>\n<p>CMDSCRIPT \/etc\/nut\/cmd.sh<br \/>\nPIPEFN \/tmp\/upspipe<br \/>\nLOCKFN \/tmp\/upslock<br \/>\nAT COMMBAD * EXECUTE commbad<br \/>\nAT COMMOK * EXECUTE commok<br \/>\nAT NOCOMM * EXECUTE nocomm<br \/>\nAT ONBATT * EXECUTE powerout<br \/>\nAT ONBATT * START-TIMER shutdownnow 90<br \/>\nAT LOWBATT * EXECUTE shutdowncritical<br \/>\nAT ONLINE * CANCEL-TIMER shutdownnow<br \/>\nAT ONLINE * EXECUTE powerup<\/p>\n<p><em><strong>\u0433\u0434\u0435 AT ONBATT * START-TIMER shutdownnow 90 &#8212; \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u0430\u0439\u043c\u0435\u0440 \u0438 \u0436\u0434\u0435\u043c 90 \u0441\u0435\u043a\u0443\u043d\u0434, \u0435\u0441\u043b\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 90-\u0430 \u0441\u0435\u043a\u0443\u043d\u0434 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u0432 \u0441\u0435\u0442\u0438, \u0442\u043e \u043f\u043e\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u0441\u0438\u0433\u043d\u0430\u043b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b. \u041e\u0431 \u044d\u0442\u043e\u043c \u0447\u0443\u0442\u044c \u0434\u0430\u043b\u0435\u0435.<\/strong><\/em><\/p>\n<p>2.5) <strong>\/etc\/nut\/cmd.sh<\/strong><\/p>\n<p>\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0444\u0430\u0439\u043b \u0438 \u043f\u0438\u0448\u0435\u043c:<\/p>\n<p>#!\/bin\/sh<br \/>\ncase $1 in<br \/>\ncommbad)<br \/>\nlogger &#171;UPS communications failure&#187;<br \/>\n;;<br \/>\ncommok)<br \/>\nlogger &#171;UPS communications restored&#187;<br \/>\n;;<br \/>\nnocomm)<br \/>\nlogger &#171;UPS communications cannot be established&#187;<br \/>\n;;<br \/>\npowerout)<br \/>\nlogger &#171;UPS on battery. Shutdown in 90 seconds&#8230;.&#187;<br \/>\nupscmd -u upsmon -p pass ups@127.0.0.1 shutdown.return<br \/>\n;;<br \/>\nshutdownnow)<br \/>\nlogger &#171;UPS has been on battery for 120 seconds. Starting orderly shutdown&#187;<br \/>\nsudo poweroff<br \/>\n;;<br \/>\nshutdowncritical)<br \/>\nlogger &#171;UPS battery level CRITICAL. Shutting down NOW!!!!&#187;<br \/>\nupsmon -c fsd<br \/>\n;;<br \/>\npowerup)<br \/>\nlogger &#171;UPS on line. Shutdown aborted.&#187;<br \/>\nupscmd -u upsmon -p pass ups@127.0.0.1 shutdown.stop<br \/>\n;;<br \/>\n*)<br \/>\nlogger &#171;Unrecognized command: $1&#187;<br \/>\n;;<br \/>\nesac<\/p>\n<p><em><strong>\u0433\u0434\u0435 <\/strong><\/em><\/p>\n<p><em><strong>logger &#171;UPS on battery. Shutdown in 90 seconds&#8230;.&#187;<\/strong><\/em><br \/>\n<em><strong> upscmd -u upsmon -p pass ups@127.0.0.1 shutdown.return<\/strong><\/em><br \/>\n<em><strong> ;;<\/strong><\/em><\/p>\n<p><em><strong>\u0433\u0434\u0435 -u \u0438 -p &#8212; \u0438\u043c\u044f \u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u044e\u0437\u0435\u0440\u0430 (\u0438\u0437 \u043f\u0443\u043d\u043a\u0442\u0430 2.3)<\/strong><\/em><\/p>\n<p><em><strong>ups@127.0.0.1 &#8212; \u043e\u0431 \u044d\u0442\u043e\u043c \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 2.4.<\/strong><\/em><\/p>\n<p><em><strong>logger &#171;UPS on line. Shutdown aborted.&#187;<\/strong><\/em><br \/>\n<em><strong> upscmd -u upsmon -p pass ups@127.0.0.1 shutdown.stop<\/strong><\/em><br \/>\n<em><strong> ;;<\/strong><\/em><\/p>\n<p><em><strong>\u0442\u0443\u0442 \u0442\u0430\u043a\u0436\u0435<\/strong><\/em><\/p>\n<p><em><strong>shutdown.return &#8212; \u0437\u0430\u043f\u0443\u0441\u043a \u0442\u0430\u0439\u043c\u0435\u0440\u0430, \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 2.4<\/strong><\/em><\/p>\n<p><em><strong> shutdown.stop &#8212; \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0442\u0430\u0439\u043c\u0435\u0440\u0430 (\u043f\u0440\u0438 \u043f\u043e\u0434\u0430\u0447\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0432\u0440\u0435\u043c\u044f \u0442\u0430\u0439\u043c\u0435\u0440\u0430 \u043d\u0435 \u0438\u0441\u0442\u0435\u043a\u043b\u043e).<\/strong><\/em><\/p>\n<p>2.5) <strong>chmod 777 \/etc\/nut\/cmd.sh<\/strong><\/p>\n<p>2.6) \u041d\u044e\u0430\u043d\u0441 \u043f\u043e \u043f\u043e\u0432\u043e\u0434\u0443 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0435 \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u043b\u0441\u044f \u043f\u0440\u0438 \u043f\u043e\u0434\u0430\u0447\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b shutdownnow &#8212; \u0443 \u044e\u0437\u0435\u0440\u0430 nut \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435\u0442 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b, \u0440\u0435\u0448\u0430\u0435\u043c \u044d\u0442\u043e \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u043a\u043e\u0441\u0442\u044b\u043b\u0435\u043c (\u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u044f \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u043b \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0435 \u0432\u044b\u0448\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443 sudo poweroff). \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \/etc\/sudoers (sudo \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0437\u0430\u0440\u0430\u043d\u0435\u0435! apt install sudo) \u0438 \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c:<\/p>\n<p><strong>nut ALL=(ALL:ALL) NOPASSWD: ALL<\/strong><\/p>\n<p>2.7) \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0434\u0435\u043c\u043e\u043d \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0444\u0443:<\/p>\n<p><strong>upsc ups@127.0.0.1<\/strong><\/p>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u044d\u0442\u043e:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-75\" src=\"http:\/\/gsgt.ml\/wp-content\/uploads\/2017\/11\/Selection_015.png\" alt=\"\" width=\"320\" height=\"518\" srcset=\"https:\/\/gsgt.ru\/wp-content\/uploads\/2017\/11\/Selection_015.png 320w, https:\/\/gsgt.ru\/wp-content\/uploads\/2017\/11\/Selection_015-185x300.png 185w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443.<\/p>\n<p>\u041d\u044e\u0430\u043d\u0441\u044b \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430 \u0440\u0430\u0431\u043e\u0442\u044b \u0430\u0432\u0442\u043e\u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0418\u0411\u041f:<\/p>\n<p>1) \u041f\u0440\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u0442\u0432\u0430 (\u043f\u0440\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u0432\u0445\u043e\u0434\u0435 \u0418\u0411\u041f) nut \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0430\u0439\u043c\u0435\u0440, (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e 90 \u0441\u0435\u043a\u0443\u043d\u0434) \u0438 \u0435\u0441\u043b\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f, \u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 sudo poweroff \u043e\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f nut, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<\/p>\n<p>2) \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e <em><strong>offdelay = 100 \u0438 <\/strong><\/em><em><strong>ondelay = 1. <\/strong><\/em><\/p>\n<p>offdelay &#8212; \u0432\u0440\u0435\u043c\u044f \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0430\u0445, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0418\u0411\u041f \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f (\u0432 \u0442.\u0447. \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043e\u0442 \u0431\u0430\u0442\u0430\u0440\u0435\u0438). \u0415\u0441\u043b\u0438 \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 100 \u0441\u0435\u043a\u0443\u043d\u0434 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435) \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u0418\u0411\u041f \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f.<\/p>\n<p>ondelay &#8212; \u0432\u0440\u0435\u043c\u044f \u0432 \u043c\u0438\u043d\u0443\u0442\u0430\u0445, \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0418\u0411\u041f \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f (\u043f\u043e\u0441\u043b\u0435 offdelay). \u041a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 &#8212; \u0435\u0441\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f \u0418\u0411\u041f \u0438 \u0447\u0435\u0440\u0435\u0437 5 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u0435\u0442\u0438, \u0442\u043e \u0418\u0411\u041f \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d \u0438 \u0431\u0443\u0434\u0435\u0442 \u0436\u0434\u0430\u0442\u044c 1 \u043c\u0438\u043d\u0443\u0442\u0443 (\u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435), \u0447\u0435\u0440\u0435\u0437 \u043c\u0438\u043d\u0443\u0442\u0443 \u043e\u043d \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f (\u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0435\u043d \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 &#171;\u0449\u0435\u043b\u043a&#187; \u0440\u0435\u043b\u0435) \u043f\u0440\u0438 \u044d\u0442\u043e\u043c, \u0435\u0441\u043b\u0438: \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u0435\u0442\u0438 \u0432\u0441\u0435 \u0435\u0449\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u0442\u043e \u043f\u0438\u0442\u0430\u043d\u0438\u0435 \u043e\u0442 \u0431\u0430\u0442\u0430\u0440\u0435\u0438 \u0432\u043e\u0437\u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442. \u0415\u0441\u043b\u0438 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432 \u0441\u0435\u0442\u0438, \u0442\u043e \u0418\u0411\u041f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u0441\u044f (\u0431\u0443\u0434\u0435\u0442 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043d\u044b\u0439 \u0434\u043b\u0438\u043d\u043d\u044b\u0439 &#171;\u043f\u0438\u0441\u043a&#187;) \u0438 \u043f\u043e\u0434\u0430\u0441\u0442 \u043d\u0430\u043f\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451, \u043a\u043e\u043d\u0444\u0438\u0433\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 <a href=\"http:\/\/andy.od.ua\/news_46.html\">\u0432\u0437\u044f\u0442\u044b \u043e\u0442\u0441\u044e\u0434\u0430<\/a>, \u043e\u0434\u043d\u0430\u043a\u043e, \u043e \u0432\u0430\u0436\u043d\u044b\u0445 \u043d\u044e\u0430\u043d\u0441\u0430\u0445 \u0432\u044b\u0448\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435, \u043a\u0430\u043a \u0438 \u0447\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0412\u043e\u043e\u0431\u0449\u0435, \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 nut \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u0430 \u0438 \u044f\u0432\u043d\u043e \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0442\u0430\u043a\u043e\u0433\u043e \u0437\u0430\u043c\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0412 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435 \u043f\u043e\u043b\u043d\u043e \u0438\u043d\u0444\u044b \u043f\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 nut, \u043d\u043e \u043d\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u043d\u044b \u043e\u0434\u043d\u0438 \u0438\u0437 \u0432\u0430\u0436\u043d\u044b\u0445 \u043d\u044e\u0430\u043d\u0441\u043e\u0432, \u0447\u0442\u043e \u0434\u0430 \u043a\u0430\u043a \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043e \u043d\u0438\u0445 \u044f \u0440\u0430\u0441\u043f\u0438\u0448\u0443 \u043f\u043e \u0445\u043e\u0434\u0443 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0418\u0411\u041f Ippon Back Power Pro 600 \u0447\u0435\u0440\u0435\u0437 USB. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c. \u0412\u0441\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0434 root&#8217;\u043e\u043c. 1) \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0430\u043c nut. apt install nut \u0412\u0430\u0436\u043d\u043e: \u0432 Ubuntu 14.04 (Trusty) &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/gsgt.ru\/?p=56\" class=\"more-link\">\u0427\u0438\u0442\u0430\u0442\u044c \u0434\u0430\u043b\u0435\u0435<span class=\"screen-reader-text\"> \u00ab\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 nut \u0432 Ubuntu 14.04 \u043d\u0430 \u0430\u0432\u0442\u043e\u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u043d\u044e\u0430\u043d\u0441\u044b\u00bb<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-56","post","type-post","status-publish","format-standard","hentry","category--unix"],"_links":{"self":[{"href":"https:\/\/gsgt.ru\/index.php?rest_route=\/wp\/v2\/posts\/56"}],"collection":[{"href":"https:\/\/gsgt.ru\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gsgt.ru\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gsgt.ru\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gsgt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=56"}],"version-history":[{"count":3,"href":"https:\/\/gsgt.ru\/index.php?rest_route=\/wp\/v2\/posts\/56\/revisions"}],"predecessor-version":[{"id":148,"href":"https:\/\/gsgt.ru\/index.php?rest_route=\/wp\/v2\/posts\/56\/revisions\/148"}],"wp:attachment":[{"href":"https:\/\/gsgt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=56"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gsgt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=56"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gsgt.ru\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=56"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}