0
votes
1answer
61 views

Which arguments are passed to init scripts during shutdown

I am currently looking at the startup and shutdown procedures for ubunut precise pangolin. As far as I understand at shutdown the system switches to runlevel 0 and all scripts with K* are executed ...
1
vote
1answer
130 views

Startup & shutdown scripts for Java servers

I am trying to design a graceful startup/shutdown script (Bash) for a Java app (JAR) that I will be deploying to my Ubuntu 14.04 server. I'm looking for a clean, Linux- and Ubuntu-friendly way of ...
0
votes
1answer
50 views

/etc/rc0.d script not allowed to finish

I have a script that I've written that needs to run during shutdown which brings down my vagrant instance. The script runs without issue, and I echo output to stdout (and to a file) of the process. ...
3
votes
2answers
815 views

How to shutdown Ubuntu after (2 hours) of idle?

Running: Xubuntu 14.04 32bit. I have read several outdated, not working, working different that I want answers here and elsewhere. I had a script that resulted in shutting my Laptop down at boot time ...
0
votes
0answers
18 views

Automatic shut down and reboot at specific time [duplicate]

I have an assignment that requires me to write a script that shuts down a server at 11pm and reboots it at 6am daily. So far, I have only written a command to shut it down but I do not know how to ...
0
votes
1answer
35 views

Removing Sys-V-Init script in favour of rc.local. Will application still shutdown correctly?

I've had to remove the /etc/init.d/crashplan script by doing update-rc.d -f crashplan remove in favour of starting the daemon using /etc/rc.local (the reason for this is that I have an encrypted home ...
0
votes
0answers
61 views

Ubuntu startup and shutdown

I have an Ubuntu machine with IBM Websphere and SoapUI I use SoapUI to run a MockService and Websphere to load some web applications and services. I want my machine to shutdown at 23:59 and to power ...
1
vote
1answer
76 views

Running a script at shutdown

I've read the answers to this and similar questions already, but so far none had worked for me. On my Ubuntu 11.10 (oneiric) system, all the files in /etc/rc0.d/ and /etc/rc0.d/ are links. I put ...
2
votes
2answers
187 views

Least bad way to shutdown quickly

Sometimes I would like to shut down in a hurry. By hurry I mean 5 to 10 seconds. Assume I can run any script with root privileges in tty which I've prepared beforehand, and after 5 or 10 seconds the ...
0
votes
1answer
284 views

Restart then shutdown using bash scripting?

I want to restart and then shutdown from terminal. Means that we want to startup terminal after restart and then shutdown automatically. What I am doing with explanation: Manually start my pc Run ...
1
vote
1answer
180 views

How to change shutdown script timeout?

I have a script running at shutdown of my server, it was added to rc.d scripts with update-rc.d local.shutdown stop 20 0 1 6 . The problem is that this script takes a few minutes to complete it's ...
0
votes
1answer
71 views

Simple desktop program instantly closes

I wrote a simple .desktop program with accompanying script. It worked recently but seems to have stopped for no reason. It now just opens a terminal (expected) but instead of running the rest of the ...
7
votes
2answers
6k views

Execute a script upon logout/reboot/shutdown in Ubuntu

I'd like to run a .sh file using bash on logout and shutdown of Ubuntu. I have searched up and down the web and have found only fixes for KDE and GNOME. The script is simple, I just need to know if I ...
1
vote
2answers
2k views

Auto shutdown server if there was no activity

My server should shutdown after 01:00 am, if there was no activity in the past hour. Lets say there was the last connection at 00:43 then it should check again at 01:43. How to write such a ...
1
vote
2answers
3k views

Transmission shutdown script for multiple torrents?

I have written a shutdown script for transmission. Transmission calls the script after a torrent download finishes. The script runs perfectly on my machine (Ubuntu 11.04 & 12.04). #!/bin/bash ...
1
vote
2answers
374 views

Auto-Invoke Update Manager to update everything and shutdown after system idle for x minutes?

I have Ubuntu 10.10 installed on a machine for my parents. The thing is they never request updates from Update Manager even the manager itself prompted them so. Moreover, when they are done with ...
17
votes
5answers
10k views

Execute script before shutting down

When I shut down my computer I want to show some pending tasks that I have to do before leaving the office... I did a local application to manage those tasks, basically I just want to run a command, ...