miniserver:xenial
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판 | |||
| miniserver:xenial [2017/10/27 14:40] – [WordPress] 관리자 화면 접근 차단 changwoo | miniserver:xenial [2018/01/02 02:34] (현재) – [Torrent] 잘못된 스크립트 수정 changwoo | ||
|---|---|---|---|
| 줄 692: | 줄 692: | ||
| <code - deluge-daemon> | <code - deluge-daemon> | ||
| #!/bin/sh | #!/bin/sh | ||
| - | ### BEGIN INIT INFO | ||
| - | # Provides: | ||
| - | # Required-Start: | ||
| - | # Required-Stop: | ||
| - | # Should-Start: | ||
| - | # Should-Stop: | ||
| - | # Default-Start: | ||
| - | # Default-Stop: | ||
| - | # Short-Description: | ||
| - | # Description: | ||
| - | # / | ||
| - | ### END INIT INFO | ||
| - | |||
| - | # Author: Adolfo R. Brandes | ||
| - | # Updated by: Jean-Philippe " | ||
| - | |||
| - | PATH=/ | ||
| - | DESC=" | ||
| - | NAME1=" | ||
| - | NAME2=" | ||
| - | DAEMON1=/ | ||
| - | DAEMON1_ARGS=" | ||
| - | DAEMON2=/ | ||
| - | DAEMON2_ARGS="" | ||
| - | PIDFILE1=/ | ||
| - | PIDFILE2=/ | ||
| - | UMASK=022 | ||
| - | PKGNAME=deluge-daemon | ||
| - | SCRIPTNAME=/ | ||
| - | |||
| - | # Exit if the package is not installed | ||
| - | [ -x " | ||
| - | |||
| - | # Read configuration variable file if it is present | ||
| - | [ -r / | ||
| - | |||
| - | # Load the VERBOSE setting and other rcS variables | ||
| - | [ -f / | ||
| - | |||
| - | # Define LSB log_* functions. | ||
| - | # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. | ||
| - | . / | ||
| - | |||
| - | if [ -z " | ||
| - | then | ||
| - | | ||
| - | exit 0 | ||
| - | fi | ||
| - | |||
| - | if [ -z " | ||
| - | then | ||
| - | log_warning_msg "Not starting $PKGNAME, DELUGED_USER not set in / | ||
| - | exit 0 | ||
| - | fi | ||
| - | |||
| - | # | ||
| - | # Function to verify if a pid is alive | ||
| - | # | ||
| - | is_alive() | ||
| - | { | ||
| - | | ||
| - | kill -0 $pid > /dev/null 2>&1 | ||
| - | | ||
| - | } | ||
| - | |||
| - | # | ||
| - | # Function that starts the daemon/ | ||
| - | # | ||
| - | do_start() | ||
| - | { | ||
| - | # Return | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | |||
| - | | ||
| - | | ||
| - | |||
| - | if [ $RETVAL1 != 0 ]; then | ||
| - | rm -f $PIDFILE1 | ||
| - | | ||
| - | | ||
| - | | ||
| - | else | ||
| - | | ||
| - | | ||
| - | [ " | ||
| - | fi | ||
| - | |||
| - | | ||
| - | | ||
| - | |||
| - | if [ $RETVAL2 != 0 ]; then | ||
| - | sleep 2 | ||
| - | rm -f $PIDFILE2 | ||
| - | start-stop-daemon --start --background --quiet --pidfile $PIDFILE2 --make-pidfile \ | ||
| - | --exec $DAEMON2 --chuid $DELUGED_USER --user $DELUGED_USER --umask $UMASK -- $DAEMON2_ARGS | ||
| - | RETVAL2=" | ||
| - | fi | ||
| - | [ " | ||
| - | } | ||
| - | |||
| - | # | ||
| - | # Function that stops the daemon/ | ||
| - | # | ||
| - | do_stop() | ||
| - | { | ||
| - | # Return | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | # | ||
| - | |||
| - | | ||
| - | | ||
| - | | ||
| - | | ||
| - | [ " | ||
| - | |||
| - | rm -f $PIDFILE1 $PIDFILE2 | ||
| - | |||
| - | [ " | ||
| - | } | ||
| - | |||
| - | case " | ||
| - | start) | ||
| - | [ " | ||
| - | | ||
| - | case " | ||
| - | 0|1) [ " | ||
| - | 2) [ " | ||
| - | esac | ||
| - | ;; | ||
| - | stop) | ||
| - | [ " | ||
| - | | ||
| - | case " | ||
| - | 0|1) [ " | ||
| - | 2) [ " | ||
| - | esac | ||
| - | ;; | ||
| - | restart|force-reload) | ||
| - | | ||
| - | | ||
| - | case " | ||
| - | 0|1) | ||
| - | do_start | ||
| - | case " | ||
| - | 0) log_end_msg 0 ;; | ||
| - | 1) log_end_msg 1 ;; # Old process is still running | ||
| - | *) log_end_msg 1 ;; # Failed to start | ||
| - | esac | ||
| - | ;; | ||
| - | *) | ||
| - | # Failed to stop | ||
| - | log_end_msg 1#!/bin/sh | ||
| ### BEGIN INIT INFO | ### BEGIN INIT INFO | ||
| # Provides: | # Provides: | ||
| 줄 1004: | 줄 848: | ||
| # Failed to stop | # Failed to stop | ||
| log_end_msg 1 | log_end_msg 1 | ||
| - | ;; | ||
| - | esac | ||
| - | ;; | ||
| - | *) | ||
| - | echo " | ||
| - | exit 3 | ||
| - | ;; | ||
| - | esac | ||
| - | |||
| - | : | ||
| ;; | ;; | ||
| esac | esac | ||
miniserver/xenial.1509115241.txt.gz · 마지막으로 수정됨: 2017/10/27 14:40 저자 changwoo
