added uptime.sh

uptime.sh is a sysv-init script which is executed when my server gets halted
This commit is contained in:
Steffen Vogel 2013-08-06 21:59:29 +02:00
parent c7d4aaaa5b
commit 93ee9d5bd5

11
bash/uptime.sh Normal file
View file

@ -0,0 +1,11 @@
#!/bin/bash
### BEGIN INIT INFO
# Provides: uptime
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Stop: 0 1 6
# Short-Description: Log uptime of server before shutdown
### END INIT INFO
echo $(date +%s) $(cat /proc/uptime) >> /var/log/uptime.log