LoginSignup
9

More than 5 years have passed since last update.

javaとかのプロセスをとりあえず簡単にデーモン化する

Posted at

下記のようなシェルスクリプトを作成して実行する。
標準出力はout.log、エラー出力はerr.logに吐かれる。

run.sh
#!/bin/bash
sudo -u app-user nohup java -cp app.jar com.example.Main > out.log 2> err.log &

止めたりするときはkillコマンドで何かのシグナル送るしかない。。。

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9