부팅시 리눅스 서비스를 통해 자동 시작에 추가하려고합니다.
chkconfig -add <servicename>
그리고 나는 메시지를 받는다
service <servicename> does not support chkconfig
Red Hat Enterprise 4를 사용하고 있습니다. 부팅 할 때 자동 시작에 추가하려고하는 스크립트는 다음과 같습니다.
#!/bin/sh
soffice_start() { if [ -x /opt/openoffice.org2.4/program/soffice ]; then
echo "Starting Open Office as a Service"
#echo " soffice -headless -accept=socket,port=8100;urp;StarOffice.ServiceManager
-nofirststartwizard"
/opt/openoffice.org2.4/program/soffice
-headless -accept="socket,host=0.0.0.0,port=8100;urp;StarOffice.ServiceManager"
-nofirststartwizard & else
echo "Error: Could not find the soffice program. Cannot Start SOffice." fi }
soffice_stop() { if [ -x /usr/bin/killall ]; then
echo "Stopping Openoffice"
/usr/bin/killall soffice 2> /dev/null else
echo "Eroor: Could not find killall. Cannot Stop soffice." fi }
case "$1" in 'start') soffice_start ;; 'stop') soffice_stop sleep 2 ;; 'restart') soffice_stop sleep 5 soffice_start ;; *) if [ -x /usr/bin/basename ]; then
echo "usage: '/usr/bin/basename $0' start| stop| restart" else
echo "usage: $0 start|stop|restart" fi esac