console output에 대한 업 스타트의 예제를 사용했습니다.업 스타트 콘솔 출력이 작동하지 않습니다.
/etc/init/test.conf
console output
pre-start script
# Perform whatever checks you like here (maybe checking
# '/etc/default/foo' to see if the service is enabled # or not).
#
# if there are no problems detected, simply "exit 0", else do
# something like this...
# display an error message to stderr *on the console* and also write
# the same message to the system log.
logger -is -t "$UPSTART_JOB" "ERROR: foo!"
# tell Upstart not to start the main process for the job.
exit 1
end script
# this service doesn't do much :-)
exec sleep 999
그리고 루트
$ initctl start test
initctl: Job failed to start
과 같은 메시지가 /var/log/syslog
에 존재하지만 메시지가 콘솔에 존재하지 않았다.
Jul 23 07:42:19 paul test[26595]: ERROR: foo!
어떻게 콘솔에 오류를 기록 할 수 있습니까?
이 우분투 14.04입니다
,$ initctl version
init (upstart 1.12.1)
그래서''콘솔에 stderr *에 오류 메시지를 표시합니다. '라고 말하면,''오류 메시지를 sysadmin의 콘솔에 stderr에 표시 하시겠습니까?'? 나는 그것의 유용성이 무엇인지 확신하지 못한다. –
sysadmin의 콘솔 일 수도 있고 아닐 수도있는'/ dev/console'을 설정 한 콘솔이 될 것입니다.하지만 이것은 매우 합당한 기본 설정입니다. 열린 상태에서 시스템 프로세스를 로깅하는 데 보안상의 영향이 있습니다 . – fny