[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 #!/bin/bash 2 # 3 # $Id: ups.sh 7061 2012-04-02 09:22:45Z dbo $ 4 # 5 6 7 /etc/init.d/nut stop 8 sleep 5 9 10 # Pour tout stopper 11 if [ -f /etc/nut/upsd.stop ] 12 then 13 # Fabrique /etc/default/nut 14 echo "START_UPSD=NO" > /etc/default/nut 15 echo "START_UPSMON=NO" >> /etc/default/nut 16 rm -f /etc/nut/* 17 exit 18 fi 19 20 21 # Verifie la presence de /etc/nut 22 if [ ! -d /etc/nut ] 23 then 24 mkdir /etc/nut 25 fi 26 27 chown -R www-se3.nut /etc/nut 28 chmod -R 770 /etc/nut 29 30 ## Version Debian 31 if [ -e /etc/debian_version ] 32 then 33 DEBIAN_VERSION=`cat /etc/debian_version` 34 fi 35 if [ "$DEBIAN_VERSION" != "3.1" ] 36 then 37 chown nut /dev/ttyS0 38 chown nut /dev/ttyS1 39 adduser nut dialout >/dev/null 40 fi 41 42 43 if [ -f /etc/nut/ups.conf -a -f /etc/nut/upsmon.conf ] 44 then 45 # Fabrique /etc/default/nut 46 echo "START_UPSD=YES" > /etc/default/nut 47 echo "START_UPSMON=YES" >> /etc/default/nut 48 49 /etc/init.d/nut start 50 fi 51 52 if [ ! -f /etc/nut/ups.conf -a -f /etc/nut/upsmon.conf ] 53 then 54 # Fabrique /etc/default/nut 55 echo "START_UPSD=NO" > /etc/default/nut 56 echo "START_UPSMON=YES" >> /etc/default/nut 57 58 /etc/init.d/nut start 59 fi 60
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |