RaspyFi - Topic: Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/ Simple:Press Version 5.2.6 PeterLo on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1917 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1917 Thanks for the reply.

I eventually found the orion-optimize script and tweaked it. I have only just got around to checking the forum again.

I found some more interesting stuff in the /var/www/...... area. I tweaked the Samba defaults to better suit my system.

Peter

]]>
Fri, 22 Nov 2013 15:40:32 +0100
Biker-74 on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1914 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1914 Well, RPI does IPv6, no problem. I do both IPv4 and IPv6 on all my four RPI's, plus all my other computers at home.
Two exceptions:
- My old ReadyNAS does IPv4 only and NetGear says they don't intend to provide any updates to it any more.
- My Sony TV does IPv4 only.
Currently, the WAF is so low I can't change those for the time being.

Right. So for the RaspyFi I have some (very bizarre and very odd) reasons to maintain two IPv4 addresses and I have manually edited /etc/network/interfaces to my liking. I also took the opportunity to setup a 'scope global' IPv6 address from my block. You know, you *do* have a 'scope link' IPv6 address automatically setup for you in your RPI. You just need to look for it.

root@rhapsody:~# ip addr show eth0
2: eth0: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether b8:xx:xx:xx:xx:33 brd ff:ff:ff:ff:ff:ff
inet 192.168.3.125/24 brd 192.168.3.255 scope global eth0
inet 10.0.0.125/24 scope global eth0:0
inet6 xxxx:xxxx:xxxx:8440::125/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::xxxx:xxxx:fee9:1633/64 scope link
valid_lft forever preferred_lft forever
root@rhapsody:~#

(The 'x'-es are there in this post just to keep discrete.)

The RaspyFi Web interface gladly deals with this, claiming that the interfaces file is manually edited and very smartly refuses to update this file from the Web page. It *does* propose to overwrite my own interfaces file with a 'default' one. As long as I don't let it, everything works like a charm. I might consider write-protecting my interfaces file to avoid any accidents. ;-)

Good thought about the logging on a flash card. I'll have to think about your idea. It pleases me. Then again, I wonder how long I'll use this SD card anyway. Electronics tend to age very quickly and very badly these days. I guess that a 16GB SDHC will be pretty obsolete in like what, five years? Will it "wear out" during five years? I dunno, but I'm ready to take the risk. These flash cards get cheaper by the day. I also, honestly, don't believe that I'll have any more RPI's of todays generation doing any important stuff five years from now in my home. They'll be replaced by RPI V 12.6 or something. Or something much cheaper, much smaller, much more powerful and much less power-hungry than the RPI's.

Well, come to think of it, maybe my RPI print server will still be here. If RaspBian is still supported at that time.

Best regards
Biker-74

]]>
Thu, 21 Nov 2013 23:24:30 +0100
admin on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1908 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1908 I have two points...
First: raspyfi doesn't have IPV6, since Raspberry Pi doesn't...
Second: I highly advise you to enable logs with extra caution since logging DRAMMATICALLY reduces SD card lifespan. You can write your logs on the Ramdisk and on shutdown copy them where you want em. This is how I'll proceed.

]]>
Thu, 21 Nov 2013 18:12:29 +0100
Biker-74 on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1907 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1907 I confirm that it now works as I want it to.

I need to have a good firewall, since IPv6 is activated and my ISP has provided me a private /64 block IPv6. My RaspyFi is thereby exposed to the Internet. (The way it originally was supposed that *all* computers would.)

Having setup and activated the firewall, I will of course want to investigate any suspicious traffic. The starting point for that is of course the logs.

So I need log files. Therefore I need rsyslog (or eq.) activated. This creates logfiles. Logfiles grow. So I need logrotate. Logrotate is run by a cron daemon.

If I want/need to act upon an activity logged in my logfiles, I need to know *when* it happened. So, here comes ntp. ;-)

In my humble opinion, if one has IPv6 activated, one is *required* to have a tight firewall. IPv4 is somewhat sloppily "protected" through NAT, and typically by an ADSL "modem" (router) with a simple "don't come here" firewall, so I can understand the simplified approach may people take within a "private" LAN.
Even so, an IPv4 firewall is activated together with the IPv6 firewall in *each* of my computers. May they be RPI's or other computers.
I have a Sony TV. Sony put Linux in that TV, and yes, I have noticed that there's a firewall (IPv4 only) in that TV, as delivered from Sony.

Biker-74

]]>
Thu, 21 Nov 2013 17:47:55 +0100
Biker-74 on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1904 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1904

admin said

The RaspyFi's webui performs an update script on startup, this optimize various settings, and also disables lot of processes and daemons on startup.
Cron is disabled amongst other stuff. To avoid it to be killed, just edit the file
/var/www/command/orion_optimize.sh

Right on, Sir. You got it.

That will also be the reason why the ntpd won't stay alive. ;-) In my case, I have the need for both ntpd and cron. (Not to download the BBC stuff, but for other reasons.)

Can I also draw the conlusion that nothing of the RaspyFi specific setup makes use of atd? If so, I can just purge it.

Was thinking of purging exim as well, but it will require to thread lightly, since I will enter dependency hell. :-)

Thanks for your time, and for providing this useful information.
Biker-74

]]>
Thu, 21 Nov 2013 17:01:42 +0100
admin on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1900 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1900 The RaspyFi's webui performs an update script on startup, this optimize various settings, and also disables lot of processes and daemons on startup.

Cron is disabled amongst other stuff. To avoid it to be killed, just edit the file

/var/www/command/orion_optimize.sh

You'll find this section

if [ "$2" == "startup" ]; then
## kill useless system processes
#killall -9 avahi-daemon
#killall -9 dbus-daemon
killall -9 exim4
killall -9 ntpd
killall -9 rpc.idmapd
killall -9 rpc.statd
killall -9 rpcbind
killall -9 thd
killall -9 udevd
#killall -9 automount
killall -9 cron
killall -9 atd
#killall -9 dhclient
killall -9 startpar

just comment "killall -9 cron", so it becomes #killall -9 cron Save and exit. You're now fine.

]]>
Thu, 21 Nov 2013 14:15:54 +0100
admin on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1899 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1899 Ok, I know what is... Let me some time to further investigate...

The script that adds BBC Radios!

]]>
Thu, 21 Nov 2013 12:46:42 +0100
Biker-74 on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1898 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1898

admin said

Cron has been disabled, as you may imagine. You can use chkconfig or update-rc.d to re-enable it at start
so
update-rc.d cron enable
or
chkconfig --add cron
Let me know if this solves your issue. BTW, the BBC script is very useful!

First of all: Thanks a lot for your close to real-time answer. I do appreciate you're a busy man. Was just so surpriced that no other user had responded to the initial question.

What you tell me corresponds to what I've allready tried. Nevertheless, to be sure, I have just executed the following sequence:

root@rhapsody:~# update-rc.d cron enable
update-rc.d: using dependency based boot sequencing
insserv: warning: script 'K02shairport' missing LSB tags and overrides
insserv: warning: script 'shairport' missing LSB tags and overrides
root@rhapsody:~# chkconfig --add cron
insserv: warning: script 'K02shairport' missing LSB tags and overrides
insserv: warning: script 'shairport' missing LSB tags and overrides
cron 0:off 1:off 2:on 3:on 4:on 5:on 6:off
root@rhapsody:~# shutdown -h now

# Manually power back on.

$ ssh root@rhapsody
Linux rhapsody 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l
_____ ______ _
| __ \ | ____(_)
| |__) |__ _ ___ _ __ _ _| |__ _
| _ // _` / __| '_ \| | | | __| | |
| | \ \ (_| \__ \ |_) | |_| | | | |
|_| \_\__,_|___/ .__/ \__, |_| |_|
| | __/ |
|_| |___/

Version 1.0 - http://WWW.RASPYFI.COM

Last login: Thu Nov 21 10:42:47 2013 from xxxxxxxxxxxxxxxx
root@rhapsody:~# service cron status
[FAIL] cron is not running ... failed!
root@rhapsody:~# /etc/init.d/cron status
[FAIL] cron is not running ... failed!
root@rhapsody:~# chkconfig -l cron
cron 0:off 1:off 2:on 3:on 4:on 5:on 6:off
root@rhapsody:~# ps aux|grep [c]ron
root@rhapsody:~# ps aux|grep cron
root 3218 0.0 0.3 3548 808 pts/1 S+ 11:40 0:00 grep cron
root@rhapsody:~# service cron start
[ ok ] Starting periodic command scheduler: cron.
root@rhapsody:~# /etc/init.d/cron status
[ ok ] cron is running.
root@rhapsody:~# runlevel
N 2
root@rhapsody:~#

Unfortunately, it didn't do much of a difference. But at least, now my situation is technically documented and demonstrated.

Thanks a lot for your time investigated in my and other's problems here.

Biker-74

P.S. What do you refer to with "the BBC script" ?

]]>
Thu, 21 Nov 2013 12:12:23 +0100
admin on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1896 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1896 Cron has been disabled, as you may imagine. You can use chkconfig or update-rc.d to re-enable it at start

so

update-rc.d cron enable

or

chkconfig --add cron

Let me know if this solves your issue. BTW, the BBC script is very useful!

]]>
Thu, 21 Nov 2013 11:44:32 +0100
Biker-74 on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1894 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1894

PeterLo said

However cron is disabled at boot up. I have to start cron manually via ssh.
Once started it runs correctly, until reboot...
I have tried the script and the crontab in Raspbian and it runs without manual intervention.
I have tried various ways of persuading cron to start automatically but nothing works.

Peter

At least you're not alone.

I'm just pretty surpriced you've had no respons at all to your request for help with your problem. When I write this, your question has been unanswered for over a month.

As you, I feel that "I've tried it all", but to no vail. It just won't start unless started manually from the command line. Quite annoying, it is.

Would hope that someone with the right level of competence could give a look to this.

Biker-74

]]>
Thu, 21 Nov 2013 11:25:20 +0100
PeterLo on Cron problem http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1508 RaspyFi install and troubleshooting http://www.raspyfi.com/forum/raspyfi-install-and-troubleshooting/cron-problem/#p1508 Hi,

I have been playing with Raspyfi for a few weeks now. I want to use the BBC Radio streams, to do this I use the bash script show here:
http://www.codedefied.co.uk/20.....-with-mpd/
with appropriate edits of course.
This script needs to run regularly, at boot and at least once a day.
I setup a crontab to do this. However cron is disabled at boot up. I have to start cron manually via ssh.
Once started it runs correctly, until reboot...

I have tried the script and the crontab in Raspbian and it runs without manual intervention.

I have tried various ways of persuading cron to start automatically but nothing works.

Any ideas?

Thanks

Peter

]]>
Thu, 17 Oct 2013 10:13:39 +0200