FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


PERL - writing daemon, writing "control panel"





darczeku
Hi
Anyone have some experiance with writing daemon's in perl?
I started developing small "control panel" like DirectAdmin (based on nginx web server - VERY, VERY FAST, far faster then Apache).
I can write everything directly in PHP (shell, shell_exec, system etc, runed as root - but ic can be unsafe).

So - do you have any suggestion - in which technology can I create control panel?
(I have some developing dedicated servers and VPS server to test on).
Thanks
Very Happy

(BTW, is my first post from long time:P)
MrBlueSky
I have writte some deamons in Perl to administror game servers using a web-interface. I made them listen on a socket. I wrote the web-interface in PHP, and when the admin wanted to start/stop a gameserver and the like the PHP program send a message to the socket on localhost which specified the action to be taken. The deamon took the apropriate actions and returned the appriopate response (status) back to the PHP script.
darczeku
Could you provide me source code (perl&php) to take a look into it?

I dont have much experiance in network scripting. I can also write this only using simple php&perl& bash script.
MrBlueSky
I can't provide source code from my own program. I made it for a company and I don't have access to it anymore (it's proprietary anyway).

But the part of communicating over a socket isn't that hard. I don't know if you have experience with perl, but you can take a look at this short tutorial. Once you have set up to the deamon you have to think up the syntax of the messages. I used a very simple scheme: the messages were just human readable textstrings consisting of a number indicating the operation to perform and (when needed) some parameters. The daemon performed the action and returned a message with again a number and some parameters.

You can also take a look at the Net::Daemon module.
Related topics
How control my pagina and I read email use the control panel
Not able 2 access my website's control panel
Control panel noob
Not able to Remove application in Control Panel?
which domain registrar provide best control panel...?
control panel
Blank screen when trying to access the control panel
Unable to log in to control panel
Unable to Log In to Direct Admn. Control Panel ::Help!!!
Free PHP Control Panel?
User control panel on the forum
Control Panel login: forgotten password sent to old address
unable tolog into my hosting control panel
plesk control panel
Reply to topic    Frihost Forum Index -> Scripting -> Others

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.