Hello,
I just setup a mysql slave server, and it's running smoothly, except I should manually check if the server safe to shutdown every time I need to restart or shutdown it.
This problem is related with temporary tables that master server created, as described in mysql doc.
So, I think of making custom shell script that will automatically run each time before the slave server restart/shutdown
Hi all!I am trying to run a script during shutdown and reboot. I have placed symlinks to the script in question in both /etc/rc0.d/ and /etc/rc6.d/.The script is very simple (one line!), what it does is to use rsync to make sure some files from dir A is synced with dir B that resides in my Dropbox dir. BUT! Nothing happens...I am obviously missing something, and would appreciate any help in this.
I have the following bash script on debian with the LSB header:
### BEGIN INIT INFO
# Provides: shutdown_vms
# Required-Start:
# Required-Stop: gdm vmware $local_fs $remote_fs $network
# Default-Start:
# Default-Stop: 0 2 3 4 5 6
# Short-Description: Shutdown vms
# Description: Shutdown vms
### END INIT INFO
The script shutdown guest vms when host is shutdown.
I have the following script, how do I run it on shutdown in debian linux? (don't want to use GUI)
#!/bin/bash
vms=$(vmrun list | grep '/');
for vm in ${vms}
do
echo 'suspending ' $vm
vmrun suspend $vm soft
done
I tried adding it to /usr/local/bin with chmod +x permissions.
I'm currently in the process of designing a solution to shutdown a two Ubuntu Server cluster that uses heartbeat and DRBD to replicate storage and offer a NFS share to some IP cameras.
We want to integrate a UPS into the system so the servers will shutdown gracefully.
I have a ups connected to a Linux server with a usb cable, i installed apcupsd demon and i was wondering how to instruct it to run a shell script i created when a special condition occurs?
i.e. the battery is 25% percent or the time left is 10 minutes so this condition can run the script?
I wrote a script that suspend all my virtualbox machines, and put a line in /etc/rc.local.shutdown, but it doesn't seem to work,
su - XX -c /XX
When I'm booted next time, virtualbox tells me the machine was Aborted, so the script wasn't executed. (Launching that script manually works for me)
P.S I already enabled shutdown.target
I have ubuntu 11.10 64bit, everything worked fine but after i uninstalled the airtime dj app i can't restart or shutdown my pc !! The only way to reach at the screen showing that system is going to shutdown is via terminal but it stucks and never shuts down !
I can't even restart it !
I can suspend my pc fine but can't shutdown or restart it.
I'm running keepalived under Debian (Lenny, Squeeze) in a fairly
simple setup, I'm just (ab)using it as a VRRP daemon to decide the
mastership
between two equal machines for some virtual IPs.
All the magic happens in the notify-script.
When I completely stop the daemon (using debian's init-script)
keepalived does
not run the notify-script for backup or at least fault mode, which is
what I would s