luhaowen 1 settimana fa
parent
commit
4a241cc1d7
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      vars/deployJar.groovy

+ 1 - 1
vars/deployJar.groovy

@@ -22,7 +22,7 @@
             sh "scp -o StrictHostKeyChecking=no ${jarPath} ${remoteHost}:${remoteJar}"
 
             /* 4. 启动新服务 */
-            sh """ssh -o StrictHostKeyChecking=no ${remoteHost} "sh -c 'cd ${remotePath} && sudo nohup java ${jvmArgs} -jar ${jarName} --spring.profiles.active=${profile} > server.log 2>&1 &'" """
+            sh """ssh -o StrictHostKeyChecking=no ${remoteHost} "sh -c 'cd ${remotePath} &&  nohup java ${jvmArgs} -jar ${jarName} --spring.profiles.active=${profile} > server.log 2>&1 &'" """
 
             PrintMes("发布成功 ${jarName}", 'green')
         } catch (Exception e) {