homepage Welcome to WebmasterWorld Guest from 23.21.9.44
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Procmail recipe to Start / Stop services
using email to control server services
Frank_Rizzo




msg:3245055
 11:22 am on Feb 7, 2007 (gmt 0)

I have a server running webmin. But I only access this about once a week so it seems a bit of a waste (and a potential security risk) if it is running 24/7.

I was thinking of being able to switch it off and on via email: using procmail to detect a subject word and then start / stop the service.

e.g.

mail: server@widgets.com
subject: wbmon

Procmail would detect wbmon in the subject and then issue a /etc/init.d/webmin start

mail: server@widgets.com
subject: wbmoff

Procmail would detect wbmoff in the subject and then issue a /etc/init.d/webmin stop

I can detect the keyword in the subject but how do I initiate the webmin start and stop process?

 

wheel




msg:3245371
 4:50 pm on Feb 7, 2007 (gmt 0)

That's sounds doable, but not easily.

I'd be tempted to put up a script that does the start and stop, then password protect it using .htaccess. Visit the script, login, and webmin starts. Visit the script again, it turns off.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved