added uptime.sh
uptime.sh is a sysv-init script which is executed when my server gets halted
This commit is contained in:
parent
c7d4aaaa5b
commit
93ee9d5bd5
1 changed files with 11 additions and 0 deletions
11
bash/uptime.sh
Normal file
11
bash/uptime.sh
Normal 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
|
Loading…
Add table
Reference in a new issue