Search
Search titles only
By:
Search titles only
By:
Home
Forums
New posts
Search forums
What's new
New posts
Latest activity
Members
Current visitors
Κανονισμός Λειτουργίας
Σωματείο AVClub
Log in
Register
Search
Search titles only
By:
Search titles only
By:
New posts
Search forums
Menu
Install the app
Install
Reply to thread
Home
Forums
Home Theater
Home Theater PC
Συστήματα Αποθήκευσης, Media Servers & Networking
άλλο ένα "synology DS3612xs" NAS: ATOM D510MO & XPEnology
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="leo06" data-source="post: 1057034706" data-attributes="member: 4847"><p><strong>Re: Απάντηση: άλλο ένα "synology DS3612xs" NAS: ATOM D510MO & XPEnology</strong></p><p></p><p></p><p></p><p>syntax error </p><p>τελικά το βρήκα απο το γερμανικό wiki της synology,στο crontab αυτό είναι σωστό? * 10 * * *</p><p></p><p>[CODE]#!/bin/sh</p><p># shutdown the DS if another network device is not available anymore</p><p>#</p><p># VARIABLES TO EDIT</p><p># host: network device (eg. router or PC) as reference (name or IP)</p><p># host2: network device (eg. router or PC) as reference (name or IP)</p><p># host3: network device (eg. router or PC) as reference (name or IP)</p><p># waittime (in seconds): time between each ping (for PC: use min. reboot time) to prevent shutdown while rebooting</p><p>host=</p><p>host2=</p><p>host3=</p><p>waittime=</p><p></p><p>while true; do</p><p> ping -c 1 $host || ping -c 1 $host2 || ping -c 1 $host3 > /dev/null</p><p> if [ $? == 1 ]; then</p><p> sleep $waittime</p><p> ping -c 1 $host || ping -c 1 $host2 || ping -c 1 $host3 > /dev/null</p><p> if [ $? == 1 ]; then</p><p> # shutdown DS</p><p> poweroff</p><p> fi</p><p> fi</p><p> sleep $waittime</p><p>done;</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="leo06, post: 1057034706, member: 4847"] [b]Re: Απάντηση: άλλο ένα "synology DS3612xs" NAS: ATOM D510MO & XPEnology[/b] syntax error τελικά το βρήκα απο το γερμανικό wiki της synology,στο crontab αυτό είναι σωστό? * 10 * * * [CODE]#!/bin/sh # shutdown the DS if another network device is not available anymore # # VARIABLES TO EDIT # host: network device (eg. router or PC) as reference (name or IP) # host2: network device (eg. router or PC) as reference (name or IP) # host3: network device (eg. router or PC) as reference (name or IP) # waittime (in seconds): time between each ping (for PC: use min. reboot time) to prevent shutdown while rebooting host= host2= host3= waittime= while true; do ping -c 1 $host || ping -c 1 $host2 || ping -c 1 $host3 > /dev/null if [ $? == 1 ]; then sleep $waittime ping -c 1 $host || ping -c 1 $host2 || ping -c 1 $host3 > /dev/null if [ $? == 1 ]; then # shutdown DS poweroff fi fi sleep $waittime done; [/CODE] [/QUOTE]
Verification
Post reply
Home
Forums
Home Theater
Home Theater PC
Συστήματα Αποθήκευσης, Media Servers & Networking
άλλο ένα "synology DS3612xs" NAS: ATOM D510MO & XPEnology
Top
Bottom
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…