Eurocardsharing

Go Back   Eurocardsharing > Sharing receivers > DreamBox > Tutorials

Tutorials Discussion, Reboot Script at DreamBox forum; hello i would if possible know how to write a little script that i would give to the cron jobs ...

Reply
 
LinkBack Thread Tools Display Modes
Reboot Script
Old
  (#1)
cap327
Junior Member
 
cap327's Avatar
 
Offline
Posts: 17

Level: 2 [♥ Bé-Yêu ♥♥ Bé-Yêu ♥]
Life: 0 / 46
Magic: 5 / 1433
Experience: 86%

Thanks: 0
Thanked 1 Time in 1 Post
Join Date: May 2007
Reboot Script - 02-April-2008, 22:23

hello i would if possible know how to write a little script that i would give to the cron jobs taht will use the reboot command taht is in
/sbin/reboot
The goal is to restart my server every day at 6 o clock...

I dont have any experience in script , i hope u can help me...
   
Reply With Quote
Old
  (#2)
Pity
Junior Member
 
Pity's Avatar
 
Offline
Posts: 1

Level: 1 [♥ Bé-Yêu ♥]
Life: 0 / 0
Magic: 0 / 0
Experience: 0%

Thanks: 2
Thanked 0 Times in 0 Posts
Join Date: Jan 2008
03-April-2008, 20:52

You should use the comand halt (reboot):

SYNOPSIS
/sbin/halt [-n] [-w] [-d] [-f] [-i] [-p] [-h]
/sbin/reboot [-n] [-w] [-d] [-f] [-i]
/sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]

OPTIONS
-n Dont sync before reboot or halt.
-w Dont actually reboot or halt but only write the wtmp record (in
the /var/log/wtmp file).
-d Dont write the wtmp record. The -n flag implies -d.
-f Force halt or reboot, dont call shutdown(8).
-i Shut down all network interfaces just before halt or reboot.
-h Put all harddrives on the system in standby mode just before
halt or poweroff.
-p When halting the system, do a poweroff. This is the default when
halt is called as poweroff.
(Extracted from LinuxCommand.org, Man_Pages, Halt8)

And a script, call it reboot.sh for example and copy it to /var/script:

#!/bin/sh
# Begin reboot script
#
echo "System reboot in progress..."
#
/sbin/reboot -d -f -i
#
# End reboot.sh

But if you prefer you could use the system reboot script (in my system DM600PVR):

/etc/init.d/reboot

Hope it help you...
   
Reply With Quote
Sponsored Links
thanks...
Old
  (#3)
cap327
Junior Member
 
cap327's Avatar
 
Offline
Posts: 17

Level: 2 [♥ Bé-Yêu ♥♥ Bé-Yêu ♥]
Life: 0 / 46
Magic: 5 / 1433
Experience: 86%

Thanks: 0
Thanked 1 Time in 1 Post
Join Date: May 2007
thanks... - 03-April-2008, 21:50

so i am on a dreambox, a 7020s, and the image is a gemini but i think it should be the same for other images because reboot poweroff usw are standart commands on unix systems....
   
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump



ECS on RSS ECS on Twitter ECS on Facebook ECS on Youtube
Follow us on:

Powered by vBulletin
Copyright 2002 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Dreambox