Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Dec 2014, 19:00
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Struggling to control access to a server using cron[SOLVED]
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
paulh177


Joined: 22 Aug 2006
Posts: 875
Location: ST862228

PostPosted: Wed 24 Oct 2007, 17:12    Post subject:  Struggling to control access to a server using cron[SOLVED]  

I have the abyss webserver (very neat -- can someone update the .pet to the latest version pls?) running on puppy 3.0.
The idea is to make some large photo albums available to friends.
My ISP provides lots of bandwidth between 00:00 and 16:00 and little between 16:00 and 00:00.
I want to exclude access between the latter times for obvious reasons.
Ideally I'd have the port on which abyss is running closed during that time but my router is not sophisticated enough to do that.
I have iptables set up (via wizard -- i'm not clever enough to understand how to manually craft it) with all ports except that one closed.
So I think that the only way I am going to be able to do this is to start abyssws on boot then run a cron job to kill it at 16:00 every day.
Or is there way to have a script that will reconfigure iptables "on the fly" and use cron to control that?
Or is there a "better" solution that someone knows of?

thanks

paul

Last edited by paulh177 on Thu 01 Nov 2007, 03:55; edited 2 times in total
Back to top
View user's profile Send private message 
cb88


Joined: 28 Jan 2007
Posts: 1169
Location: USA

PostPosted: Wed 24 Oct 2007, 17:28    Post subject:  

Pschedule is a frontend to cron that is easier to use than gcrontab...here is the link maybe it will help you get started.. http://www.murga-linux.com/puppy/viewtopic.php?t=22166&search_id=1530290542

zigbert is pretty open to sugestions if you can think of ideas how to make his programs better

_________________
Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30
Back to top
View user's profile Send private message Visit poster's website 
paulh177


Joined: 22 Aug 2006
Posts: 875
Location: ST862228

PostPosted: Thu 25 Oct 2007, 03:15    Post subject:  

thanks, looks good.
I'm not sure if crond runs by default in puppy but I can't see it in a ps so I'm assuming i can to set it to start in rc.local?
Back to top
View user's profile Send private message 
paulh177


Joined: 22 Aug 2006
Posts: 875
Location: ST862228

PostPosted: Fri 26 Oct 2007, 15:56    Post subject:  

I'm struggling to make cron work. I've looked at the various threads where others have also struggled with the same problem, but ...

I've put
Code:
 /usr/sbin/crond -L /tmp/cronjobs.log
into rc.local

ps shows crond as running after a reboot

I've setup cron jobs using Pschedule and/or Gcrontab and they are sitting happily in the file /var/spool/cron/crontabs/root. It doesn't seem to contain tabs.

To test I've got a little script which echoes a few characters to file in /root ... but it is not being executed and i've even remembered to set it executable.

My cronjobs.log file contains nothing except a line indicating crond has started.

/var/log/messages also notes crond starting up but I also noticed that the kernel timestamps were different from my local time so I reset the time in puppy (it was set to perth not london)

Dunno what else to try/check ...

paul
Back to top
View user's profile Send private message 
paulh177


Joined: 22 Aug 2006
Posts: 875
Location: ST862228

PostPosted: Thu 01 Nov 2007, 03:54    Post subject:  

i finally got cron working satisfactorily; i opened /var/spool/cron/crontabs/root with e3vi and found what appeared to be an "extra" character at the end of the file; removing this and saving the file seemed to cause cron to spring into life.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0487s ][ Queries: 11 (0.0037s) ][ GZIP on ]