snippets/bash/uptime.sh
Steffen Vogel 93ee9d5bd5 added uptime.sh
uptime.sh is a sysv-init script which is executed when my server gets halted
2013-08-06 21:59:29 +02:00

11 lines
290 B
Bash

#!/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