Linux jar包部署啟停指令碼

2021-10-25 05:56:48 字數 724 閱讀 9860

我的使用場景是對兩個jar包通過指令碼進行統一的啟停管理

#!/bin/bash

(backstage-service file-service)

for i in

do#echo $i

pid=

`pgrep -f $i`

#echo $pid

if[ -n "$pid"];

then

kill -kill $pid

fidone

&1 &

&1 &

#!/bin/bash

(backstage-service file-service)

for i in

do#echo $i

pid=

`pgrep -f $i`

#echo $pid

if[ -n "$pid"];

then

kill -kill $pid

fidone

#!/bin/bash

(backstage-service file-service)

&1 &

&1 &

一般來說我們主要用到最多的就是重啟,其次就是停止指令碼。在linux中通過vim ***.sh建立相應的指令碼,然後 sh ***.sh執行就可以

SVN啟停指令碼

說明 特別注意紅色部分,外部 1傳入msg函式時失效,故特此讀取一遍再傳入!執行時要給指令碼加執行許可權!chmod 755 scripts svn root kazihuo scripts cat svn 1 bin bash 2 by luomurui 2018 05 07 34 f etc i...

nginx啟停指令碼

安裝nginx時,原始碼包中未帶官方的啟動指令碼,也就無法使用service nginxd start這種啟動方式,查了下資料自己寫了乙個 bin bash version 0.0.1 author lifafu file time 2017 02 04 08 00 company source e...

Kafka集群啟停指令碼

先登入root賬號再進行以下操作。首先需要先配置ssh免密登入,可參考linux ssh免密登入進行配置 1.建立並編輯指令碼 建立並賦予執行許可權 vim batch kafka.sh bin bash iparray node1 node2 node3 這裡我放的是網域名稱,也可以放ip位址 k...