小编Mar*_*cke的帖子

如何设置 TeamCity Command Line Runner 默认 shell?

我通过init.d如下脚本在 Ubuntu 15.10 上启动我的 TeamCity 代理:

#!/bin/sh
### BEGIN INIT INFO
# Provides:          TeamCity Build Agent
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start build agent daemon at boot time
# Description:       Enable service provided by daemon.
### END INIT INFO

USER="myuser"

case "$1" in
  start)
    su - $USER -c "/home/myuser/BuildAgent/bin/agent.sh start"
  ;;
  stop)
    su - $USER -c "/home/myuser/BuildAgent/bin/agent.sh stop"
  ;;
  *)
    echo "usage …
Run Code Online (Sandbox Code Playgroud)

bash teamcity init.d

5
推荐指数
0
解决办法
3073
查看次数

标签 统计

bash ×1

init.d ×1

teamcity ×1