HEX
Server: Apache/2.2.22 (Debian)
System: Linux martin 3.2.0-6-amd64 #1 SMP Debian 3.2.102-1 x86_64
User: otzyv-tut.ru (515)
PHP: 7.1.20
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Upload Files
File: //etc/rc3.d/S01motd
#!/bin/sh
### BEGIN INIT INFO
# Provides:          motd
# Required-Start:    hostname $local_fs
# Required-Stop:
# Should-Start:
# Default-Start:     1 2 3 4 5
# Default-Stop:
# Short-Description: Create dynamic part of /etc/motd
# Description:       /etc/motd is user-editable and static.  This script
#                    creates the initial dynamic part, by default the
#                    output of uname, and stores it in /var/run/motd.dynamic.
#                    Both parts are output by pam_motd.
### END INIT INFO

PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/init/vars.sh

do_start () {
	# Update motd
	uname -snrvm > /var/run/motd.dynamic
}

do_status () {
	if [ -f /var/run/motd.dynamic ] ; then
		return 0
	else
		return 4
	fi
}

case "$1" in
  start|"")
	do_start
	;;
  restart|reload|force-reload)
	echo "Error: argument '$1' not supported" >&2
	exit 3
	;;
  stop)
	# No-op
	;;
  status)
	do_status
	exit $?
	;;
  *)
	echo "Usage: motd [start|stop|status]" >&2
	exit 3
	;;
esac

: