hi,
i like to know how can i reboot(restart) ubuntu server every sunday at 2:30am.can it be reboot straight way?or oscam or cccam need to stop first then reboot will start?
how to reboot server
- sunlight786
- Thread is marked as Resolved.
-
-
hi,
i like to know how can i reboot(restart) ubuntu server every sunday at 2:30am.can it be reboot straight way?or oscam or cccam need to stop first then reboot will start?Do you know how to setup a cron job?
you could set a simple job up to 'shutdown -r now'
I assume your cccam & oscam will automatically come back up after a reboot? If not you'll need to script that as well!
-
yes i know a bit how to creat a crontab but i like to clear some thing as last time when i add oscam.check script which is running every 5 minut.i login putty and write this command
vi /etc/crontaband i found some cronjobs already there and i add my new command to run every 5 minut.
but now i like to add sysytem to reboot every sunday , which command do i need to type?
vi /etc/crontab
OR
crontab -e
when i type crontab -e its a empty page so far.and what will be the command look like? i made this 30 2 * * 0 reboot
is that ok? -
please double check that is this way is also OK or not?
I think if i want to reboot the system whenever it reaches seven days uptime..
First, i will create a new script, shell script, run:Code:
nano /bin/RestartMeCode:
#!/bin/bashup=$(/usr/bin/uptime | cut -c14-19)
if [[ '$up' = '7 days' ]]; then
/sbin/shutdown -r +2
fiexit 0
# ENDAnd, then close and save the file and chmod 755 /bin/RestartMe, now i will setup a cronjob to run every night:
To open crontab editor:
Code:
crontab -e and add30 2 * * * /bin/RestartMe
Summary:
The crontab i sat above, will run the script every night at 2:30 AM server time, thus the script will check for the server uptime, if it's 7 days, a system reboot will be fired.
The reboot command will wait 2 minutes before doing the real reboot, this way it gives a chance for any logged user to finish any running work.Otherwise, if i want to reboot the system on Sunday after 2 after midnigh (Monday Early Morning), no matter how long is the uptime.. go like:
Code:
crontab -e and add
30 2 * * 1 /bin/RestartMei have not check this script yet but if some one please update us if its work.
-
is it possible to schedule WEBMIN to reboot server??
-
Hello friends! I have set up a server, but I can’t use it because it goes down every night 3_56. I have tried to use Oscam_Status_Check_Script, but it not work. I don’t now what is wrong. I put it in var/skript. It is right?
#!/bin/sh
#
FOO=”/tmp/_tmp”
LOGIN=”root”
PW=”pappa”
IP=”192.168.1.90”
PORT=”8080
STR=”TITLE>”
#
curl -s –digest -o – -u $LOGIN:$PW “http://$IP:$PORT/status.html?hideidle=0? | grep “$STR” > $FOO
printf “Checking for ERRORS …\n”;
if [ -s $FOO ]; then
printf “\033[37;32mOscam working OK\033[37;40m\n”;
else
printf “\033[37;31mOscam ERROR!\033[37;40m\n”;
/usr/local/bin/oscam -b > /dev/null
fi
rm -f $FOO
exit 0Is this right? Regards POS:still_dreaming:
-
what exact did you set up? oscam its own, oscam&cccam?
as many of auto cccam install script has these script where every night ccccam stop 3:56am to update etc.............
follow this tut it should work as i do for me.
How to: Oscam stop/start script + anti-crash monitor -
Display More
Hello friends! I have set up a server, but I can’t use it because it goes down every night 3_56. I have tried to use Oscam_Status_Check_Script, but it not work. I don’t now what is wrong. I put it in var/skript. It is right?
#!/bin/sh
#
FOO=”/tmp/_tmp”
LOGIN=”root”
PW=”pappa”
IP=”192.168.1.90”
PORT=”8080
STR=”TITLE>”
#
curl -s –digest -o – -u $LOGIN:$PW “http://$IP:$PORT/status.html?hideidle=0? | grep “$STR” > $FOO
printf “Checking for ERRORS …\n”;
if [ -s $FOO ]; then
printf “\033[37;32mOscam working OK\033[37;40m\n”;
else
printf “\033[37;31mOscam ERROR!\033[37;40m\n”;
/usr/local/bin/oscam -b > /dev/null
fi
rm -f $FOO
exit 0Is this right? Regards POS:still_dreaming:
Pos,
I've been experimenting with 3 or 4 different scripts like this over the past week....none of them work unfortunately!! I haven't been able to check the one you are considering using as I only have a Vu+ box which doesn't (AFAIK?) have Curl installed...
you just need to save the file in your script directory, give it 755 permissions and setup a cron job to run every x minutes...
-
what exact did you set up? oscam its own, oscam&cccam?
as many of auto cccam install script has these script where every night ccccam stop 3:56am to update etc.............
follow this tut it should work as i do for me.
How to: Oscam stop/start script + anti-crash monitorMust check that out myself cheers!
edit - looks a bit more promising! I guess I'll see after a week!!
-
Hello again! You just need to save the file in your script directory, "give it 755 permissions and setup a cron job to run every x minutes..." Perhaps it is this that is wrong with my script? What must I do to let it check every 5 minute? Regards POS
-
-
Hello again! Here is what is written in Oscam.log when it stop.( 2011/12/17 3:56:01 0 s thread B774A6C0 exit with signal 15
2011/12/17 3:56:01 0 s cardserver down)
This happen every night. Any ideas abaut my problem? regards POS -
Hello friends! I still struggle with this server, its stop every night 3, 56. It was written that it update every night in that time, so maybe I must just switch of update then. I have search for an explanation who to switch of update, but it is not easy for a windows man. Any who have an easy way to do it? Regards and Happy New year from POS
-
To change the time edit the file /ect/crontab,
Code
Display More# /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file # and files in /etc/cron.d. These files also have username fields, # that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root cd / && run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) 47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ) 52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly ) # [COLOR='#FF0000']56 03 * * * root killall CCcam.x86 56 03 * * * root killall oscam[/COLOR] 57 03 * * * root /var/script/configupdate.sh >> /var/cccamlog/configupdate.log 58 03 * * * root /var/script/keyupdater.sh 59 03 * * * root /usr/local/bin/CCcam.x86 59 03 * * * root /usr/local/bin/oscam -b */5 * * * * root /var/script/CCcamCheck.sh */5 * * * * root /var/script/OscamCheck.sh 03 04 * * 6 root /var/script/LogCleanUp.sh >> /var/cccamlog/CleanUp.log -
Hello! It is very difficult, but I still try. Regards POS:oh:
-
Hello friends! I almost given up now. Is there any who have a skript that work? I need a skript that start server when it go down. I have try webinf skript. Regards POS
-
Silverfox0786 has rewritten the script if you want to try that instaed.
OSCam/CCcam Auto Install Scripts Version1 20.01.2012 By Silverfox0786
I can confirm the check script in the autoinstall by alamski also works well.
Your resource for Linux TV servers and smart card readers.
Find software downloads, drivers, and support for server setup and card-sharing configurations. Set up a Linux-based TV server. Access downloads and support for server software and USB card readers for advanced TV reception and management
