Server :: Shutdown Server After Website Logout?

Jan 26, 2010

I have a debian machine with an apache2 webserver. I am able to start the machine from the internet (power plug board with webinterface) but I don't know how to shutdown the server automatically if nobody uses the website anymore. It is a homeserver which should only run if needed.

Unfortunately I don't know much about Linux, apache, php, cgi-scripts, cronjobs and other things that might be useful. But I googled a lot and have now an idea how it could work. It seems complicated to me and so I want to ask you guys what you think about it and if perhaps you could give me a hint.

The idea: A cronjob starts every ten minutes a php script that checks when the index.html of the welcome-page was opened the last time (fileatime()). Lets say it was opened last time at 3pm. Then the php script adds for example 60 minutes to that time (=4pm) and calculates how much time is left to 4pm. This time is saved in the variable $timeleft. Now the php script compares if $timeleft is less then 10 minutes (=600 seconds). If it is, the php script starts a cgi script that will shutdown the server. The cgi script will login as root (I think that can be done with the "expect"-command url and then enter the command "shutdown -h now"

Is all this realizable? Isn't there a better and/or easier way to do?

View 2 Replies


ADVERTISEMENT

Server :: Unable To Shutdown/reboot Server, No Shutdown Process Running?

Mar 30, 2010

I'm trying to reboot the server (shutdown -r now).But it seems like nothing happened.

When I try "shutdown -c", the system prompts "shutdown: cannot find pid of running shutdown."

View 5 Replies View Related

Server :: Config Apache Server To List Php, C/c++, Java Files As Regular Txt On Website?

Feb 2, 2011

I try to config my apache server to list all my files: c/c++, php, java files, like the txt file on my server,

e.g /var/www/mydomain/pub

i want to dump all my c/c++, php, java file under the pub directory and I can access it from my domain name,

if I dump txt file, I have no problem to view it, but when I dump c/c++ or php files under pub directory, then I can't view it like regular txt file,

Q: is there anyway I can configure my apache server to view all the c/C++, php, java file as like txt file?

View 1 Replies View Related

Server :: Config Apache Server To List Php / C/c++ / Java Files As Regular Txt On Website?

Feb 23, 2011

config my apache server to list all my files: c/c++, php, java files, like the txt file on my server, e.g /var/www/mydomain/pub i want to dump all my c/c++, php, java file under the pub directory and I can access it from my domain name, if I dump txt file, I have no problem to view it, but when I dump c/c++ or php files under pub directory, then I can't view it like regular txt file, Q: is there anyway I can configure my apache server to view all the c/C++, php, java file as like txt file?

View 1 Replies View Related

Server :: Transporting A Joomla Website To A Virtual Server

Dec 4, 2010

I've got a Joomla website made for me. It is hosted with a hosting company. Here and there i change some of its content, but i want to practice it locally on my computer before i do bigger things on the web, so that if things get into a serious problem it is close at hand to fix it up. I've installed apache2 php5-mysql libapache2-mod-php5 mysql-server on my Ubuntu 10.04 desktop. also, I've installed Joomla up and running.

My question is: how do i transport/copy my website from the web into my computer?

I know that I need to transfer the database, where do i put it in my local file system, and what additional commands are required for that?

I know that I need to transfer the public_html, where do i put it in my local file system, and what additional commands are required for that?

View 7 Replies View Related

Server :: Access Website Via External Server

Mar 29, 2011

suppose i have a website named www.site.net now i want to access this website using proxy server(squid,or etc...) under my personal server named www.anotherwebsite.net:8080, means that www.site.net.

View 1 Replies View Related

Server :: View Server Signature On Website?

Oct 25, 2010

How can I view server signature on my website.

View 7 Replies View Related

Server :: Shutdown The Nodes From The Master Terminal Using "shutdown -h Now" Get Shutdown?

Dec 10, 2010

I have installed a cluster computer with 10 nodes . The manufacturer is HP . All nodes and the master node have redhat enterprise linux installed in them . When I shutdown the nodes from the master terminal using "shutdown -h now" they get shutdown . But they dont get completely turned off . This issue bothers me when the power supply is given , all nodes boot up simultaneously generating a huge heat .

Thing to note : When we shutdown our PC they get completely turned off . When the power supply is given , a press on the Power On button is required to boot the system. But , why does it not happpen in the case of cluster? Is there any other way of completely turning off the nodes from the master terminal ?

View 1 Replies View Related

Debian Multimedia :: Kde 4.4.5 Can't Shutdown Or Logout?

Aug 5, 2010

I just installed debian unstable with kde 4.4.5 on a new hp desktop. Just about everything is working fine except when I try to logout or shutdown by right clicking on the desktop. No matter which option I choose--logout, shutdown, or restart--the screen goes black and nothing happens. I'm forced to do a hard shutdown or use alt-SysRq-B to reboot. I can reboot or shutdown using the command line when logged into kde.

View 4 Replies View Related

General :: Run A Prompt At Logout Or Shutdown?

Feb 20, 2010

Is there a way to run a prompt at logout or shutdown? I added the following code to .bash_logout, but apparently the �read� command doesn't work from there.

Code:
echo "Make a backup now? (y)"
read answer
if [ "$answer" != "y" ]
then
echo "Backup aborted."
fi
I am using Ubuntu 9.10

View 2 Replies View Related

Fedora X86/64bit :: Unable To Logout Or Shutdown From KDE?

Jan 31, 2011

For some reason in the last few days I can no longer logout of KDE, nor will it let me shutdown the system. The only way out is to Ctrl+Alt+Backspace and then shutdown from there. Weird thing is other users can. For me the logout box just disappears and I carry on working or if effects are enabled, the screen blurs and I carry on working. After this the logout box doesn't come back up until I have restarted X (logged out).

I have tried disabling the desktop effects to no availe and I have looked in the messages / kdm logs. So far the only thing I can find is in KDM.log

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Internal error: Could not resolve keysym XF86TouchpadOn
> Internal error: Could not resolve keysym XF86TouchpadOff

I have no idea if this is at all relevant but there are several threads from Google relating to this and GDM, although no cures as far as I can tell.

I would rather not delete my ~/.kde folder again if at all possible as it takes ages to reset everything back to normal.

View 3 Replies View Related

Ubuntu :: 10.04 : Shutdown / Logout Panel Missing

Jul 12, 2010

I added a Netspeed applet to my top panel. It screwed up my Me Menu and Logout menu, so I removed it, rebooted. However after the reboot my menu's are still screwed up. See the attached screen shot. The Me Menu works however if I click where the logout menu is supposed to be I don't get anything.

View 9 Replies View Related

Ubuntu :: Shutdown - Restart And Logout Buttons Will Not Do Anything

Nov 5, 2010

On two of my machines that have Ubuntu 10.10 on them, I cannot shut down, restart or log out by pressing the "power button" on Gnome panel. I can not even do "Alt + Ctl + Backspace" either. However, I can shutdown or restart by: Quote: sudo shutdown -h now sudo shutdown -r now

View 4 Replies View Related

Ubuntu :: User Can't Shutdown, Logout, Restart?

Sep 29, 2010

My normal day to day user can't shutdown, restart, logout, etc...It just doesn't do anything at all when I try. This wasn't the case three days ago, just fresh installed and seeing the same problem (so it must be some setting saved in my home folder which wasn't wiped).

View 5 Replies View Related

General :: How To Auto Logout From Server

Jan 6, 2010

I'm wondering how to let him logout automatically from server when the user is in idle for a long time after login.

View 1 Replies View Related

Ubuntu :: Website Will Not Load - "server Not Found Firefox Cant Find Server"

Feb 9, 2011

Having a problem on all of my Ubuntu machines when i goto this address: [URL]... i get a "server not found Firefox cant find the server [URL]... this is only happening on Linux i have a dual boot on an epc with vista and it loads the site. normally i wouldn't even care but my girlfriend will be taking on line classes here and i need to get this to load.

View 5 Replies View Related

Fedora Installation :: Fresh Install Of F13 - Cannot Shutdown Or Logout

Sep 14, 2010

I've installed F13 on a DELL computer. Everything works fine except that under KDE menu if I click on 'shutdown', I have the confirmation windows but the computer never shutdown. Same issue with the the logout button. If I want to stop my commuter I have to open a terminal and type " shutdown now" or "halt".

View 1 Replies View Related

Ubuntu :: 10.10 Suspend/restart/shutdown/logout Often Freezes?

Oct 21, 2010

Lenovo X200 notebook, 64bit maverick, external monitor connected through DisplayPort, fast SSD drive, encrypted homeI'm almost positive these issues were non existent after installing 10.10RC, but I'm not 100% sure. Maybe I will install it again to check it outAnyway, when I try to suspend/restart/shutdown/logout the system often freezes, showing the console with the similar output:I know this guy is running Ubuntu in VM, but I have very similar ouput, except the last usplash line.But the first line I always have in the output is the infamousQuote:GLIb-WARNING **: getpwid_r(): failed due to unknown user id (0)On a very rare occassion, the system hanged while booting (showing the above glib line as well. But that's quite rare, so I'm not that concerned.

Now, sometimes it does respond to ctrl+alt+delete after freezing, and after I hit this combination, another line appears (from memory):Quote:Init: rc main process killed by TERM signalChecking for running unattended-upgradesBut that's it, I cannot do anything else, only hard reset, which is especially painful when I suspend in the middle of work...There is no interesting information in the logs - a few messages in the kern.log, but nothing I think would show the culpritEDIT: other than that, the machine is very stable and I have no issues with it. It also worked perfectly on lucid 32bit.

View 1 Replies View Related

Ubuntu :: Cannot Shutdown/Logout/Reset Through Graphic Interface?

May 9, 2011

working on KDE, I cannot shutdown, reset, logout or switch users through graphical interface (you know, bit blue button, 'leave' tab and all these buttons).I've googled the problem, and here's what I have found:[URL]Guys on the Arch forum related the problem to the OGG files and phonon-xine - indeed, I cannot play OGG files anymore.I tried to install phonon-vlc, but the package is not in any of my repositories. I tried to remove libqt4-phonon, but it would also remove half of the system, which isn't the best idea. Someone else suggested to install speex, but it's already installed on my Kubuntu.I'm out of ideas, and I'm not really sure how to reinstall xine and phonon without deleting half of the system like this:

Code:
The following packages will be REMOVED:
akregator amarok apport-kde apport-qt apturl-kde ark calibre digikam dolphin dragonplayer

[code]....

View 1 Replies View Related

General :: X Server Dies On Logout Kubuntu 10.10

Dec 15, 2010

When I logout on kubuntu my xserver dies and I have to start x again manually from console. Im not to kubuntu 10.10 and I tried to check out /etc/X11/xorg.conf but its not there. on reboot xserver starts automatically. I am using opensource drivers and video card is radeon x700 pro

View 3 Replies View Related

Fedora :: Shutdown/Restart/Logout Buttons Do Not Work After An Update?

Mar 8, 2010

I am running Fedora 12 with KDE on an Acer Aspire One netbook.

A recent update has caused the KDE shutdown/restart/logout buttons (found for example through the Fedora -> Leave menu or by pressing the power off switch)to stop working. I am having to shutdown using shutdown -P now command.

So I have the following questions:

a) Has anyone else had this issue and knows a workaround/fix?

b) Does anyone know what package these belong to so I can try an older version?

c) Does anyone know where this package writes its logs, or if I need to install anything for it to do so so I can have a look?

d) Does anyone know the command-line interface to these commands - that may give me either a more gentle workaround than shutdown -P now, or some insight into why the command is no longer working.

View 3 Replies View Related

OpenSUSE Install :: How To Record/save Logout/shutdown Messages For 11.2

Jun 20, 2010

how to record/save logout/shutdown messages for OpenSuse 11.2.

View 9 Replies View Related

Ubuntu :: Shutdown/hibernate/logout Etc Has Disappeared From Indicator Session?

Apr 5, 2010

For some reason the shutdown/hibernate/logout options has disappeared from the Indicator session. I can still set my status in EmpathyI have tried reverting to gnome panel defaults (gconftool --recursive-unset /apps/panel && killall gnome-panel), removing and readding and I've checked synaptics and it seems I have everything indicator-related installed.

View 2 Replies View Related

Ubuntu :: Logout Delay - Countdown: Will Be Logged Out Or Shutdown In 60 Seconds

May 23, 2010

When I click logout or shut down I get a countdown saying I will be logged out or shut down in 60 seconds, then it counts down. I can click the "shut down now" button, but I find this behavior incredibly irritating. When I click logout I would like to logout NOW.

View 6 Replies View Related

Fedora :: Normal Users Cannot Logout Or Shutdown In KDE FC14 After Upgrade?

Dec 23, 2010

as a normal user when I click logout from a KDE session nothing happens and I can't re-launch logout again, shutdown is doing the same.I have just upgraded to fc14 from fc13 yesterday tried to delete .kde folder and it has not been succesful tried to create another user and log to kde session and the new user also failed to logout or shutdown Root user is able to logout and shutdown I have no probs on GNOME for root or users.

View 1 Replies View Related

OpenSUSE Install :: Shutdown / Restart Screen Distortion With Logout Desktop Effect

Mar 28, 2011

When trying to "Leave" the system (either via the small button on the lower right of the taskbar or by right clicking on the Desktop and selecting "Leave") the logout / shutdown / restart screen comes up. I have the "Logout" desktop effect activated, which is supposed to desaturated the background when the Leave screen appears. However, instead of simply greying out the background, the image on the desktop and the rest of the screen also gets slightly distorted, with seemingly random distortion effects cropping up all over the place (e.g. horizontal lines or large blurs).

These distortions are different every time the Leave screen comes up. The Leave screen itself is displayed fine, and apart from the dodgy background I have no other issues with the whole process (the system shuts down or restarts properly according to my choice). I am using the Radeon drivers, and all other desktop effects I have on (Magic lamb, cover switch, present windows, etc) work fine and without a hitch. It's only the Logout effect that seems to glitch. Are the distortions intentionally created by the effect in order to emphasize the focus on the Leave screen?

View 2 Replies View Related

Fedora :: Logout And Cancel Are Only Options In KDE Menu / Lost Ability To Do A Shutdown Or Restart?

Dec 16, 2008

I have lost my ability in KDE Menus to do a shutdown or restart. My only option is to logoff or cancel. This started occurring about 2 weeks ago, possibly 2 KDE workspace updates ago. I have been assuming it would get fixed with an update but so far it has not.

I am running Fedora 10 x86_64, kernel = 2.6.27.7-134.fc10.x86_64, and the KDE version is:

kde-filesystem.noarch 4-20.fc10 installed
kde-settings.noarch 4.1-4.20081031svn.fc10 installed
kde-settings-kdm.noarch 4.1-4.20081031svn.fc10 installed
code....

I have 3 different systems all running the same OS and KDE versions and it is happening on all 3 systems. All systems have the "Offer Shutdown Options" selected in Session Manager. I have even turned this option off, rebooted, and then back on to try to jumpstart it but that did not work.

Additionally, I have tried deleting the contents of the /tmp directory while in single-user mode and also the .kde under my home directory. This made no difference.

Another symptom I am noticing is that any desktop widgets that I create all get moved to the upper left-hand corner of the display whenever I reboot and log back in. Any extra shortcut widgets that I add to the panel are also gone the next time I log in.

Again, these same symptoms are occurring on 3 different machines.

These symptom do not occur after a fresh install of FC 10. It is breaking during one of the yum updates but I have not narrowed it down yet as to which update is causing this to happen.

View 3 Replies View Related

Server :: How Many Requests To Each Website

Aug 15, 2010

I'm just asking about a script (ex, bash script) that will let me know how many requests to each website on the server? So is there a way to get know from shell how many requests or connections to each web site on the server, in order to determine which website is under flood or DoS/DDoS attack.

View 14 Replies View Related

Server :: How To Block The Particular Website

Jan 9, 2011

i am using rhe5.4 , in this how to block the particular website ?

View 2 Replies View Related

Server :: Apache Serves Up Website From Any URL?

Feb 17, 2011

I'm running Ubuntu 10.04 with apache, rails, mysql, etc. My rails site is running at www.example.com. I'm intending to use named-based virtual hosting and I have a virtual hosts file configured/enabled for www.example.com. My site is hosted on Amazon EC2.

The problem is that if I set up a new DNS record -- say test.example.com -- and browse to that, my site www.example.com is served up! That's without configuring any new virtual hosts. And the same is true if I go to my DNS records and define test2.example.com, etc. Without touching my server, these new URLs serve up my website. That's not what I want! I want to use name-based virtual hosting and host different sites for each subdomain.

[Code]...

UPDATE: now I understand a bit more... apparently my real problem is not what I thought it was. My real problem now appears to be that when I copy this virtual hosts file and edit it to add a new subdomain name, set up the corresponding site, etc., and enable the virtual host (a2ensite) and restart (graceful), apache immediately stops serving up any websites. Apparently apache crashes although I do not see any error messages. But all my sites go down and I have to revert and then restart apache.

I thought this was because my virtual host file (pasted above) had an error. So I thought I would start by getting that first file right. Apparently it is right. So now I need to understand why adding a second virtual host causes all sites to stop being served up.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved