ユーザ用ツール

サイト用ツール


linux:shiny_server:shinyserver

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン両方とも次のリビジョン
linux:shiny_server:shinyserver [2020/03/03 12:59] – 作成 adminlinux:shiny_server:shinyserver [2020/03/03 14:38] Wiki Editor
行 72: 行 72:
   }   }
  
 +===== 起動スクリプト =====
 +Gentoo OpenRC用の起動スクリプト。
  
 +注意点は、start-stop-daemonのオプション「--background」「--make-pidfile」をつけておくこと。
  
 +shinyは勝手にバックグラウンドにならないのでbackgroundオプションで切り離し、 pidファイルも生成しないのでmake-pidfileでpidfileオプションで指定した場所にpidファイルを吐き出させる。これでstop関数が正常に動作する。
  
 +
 +
 +  #!/sbin/openrc-run
 +  # Copyright 1999-2016 Gentoo Foundation
 +  # Distributed under the terms of the GNU General Public License v2
 +  
 +  description="R Shiny Server"
 +  pidfile="/var/run/shiny-server.pid"
 +  command="/usr/local/shiny-server/bin/shiny-server"
 +  
 +  depend() {
 +          use net
 +  }
 +  
 +  start() {
 +          ebegin "Starting Shiny Server"
 +          start-stop-daemon --start --quiet --background --make-pidfile --pidfile ${pidfile} --exec ${command} \
 +          >> /home/shiny/log/shiny-server.log 2>&1
 +          eend $?
 +  }
 +  
 +  stop() {
 +          ebegin "Stopping Shiny Server"
 +          start-stop-daemon --stop --quiet --pidfile ${pidfile}
 +          eend $?
 +  }
  
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki