0

我有一个脚本(sb_start_main),它调用另一个脚本(check_for_updates)来提取一个git repo。当我直接运行任一脚本(sb_start_main 或 check_for 更新)时,它是成功的。我添加了一个带有时间戳和当前用户的 echo 语句(正如预期的那样,它是 sookbox)。

bash /home/sookbox/update_testing/check_for_updates
sookbox Current time stamp: Tue Jun 11 11:51:47 EDT 2013
.....checking for updates
.....fetching origin master
.....current version of master  :  v1.6

我将脚本 sb_start_main 添加到 rc.local 以便它在启动时运行。当我这样做时,脚本不再起作用,即使它以正确的用户身份运行,sookbox:

sookbox Current time stamp: Tue Jun 11 11:49:28 EDT 2013
.....checking for updates
.....fetching origin master
conq: repository access denied.
fatal: The remote end hung up unexpectedly

我很确定问题是这在启动时失败了,因为我只是尝试将其安排为 cronjob 来运行@reboot,但它以完全相同的方式失败。我已经尝试通过 rc.local 运行脚本并在它之前添加一个睡眠,以防问题是互联网访问尚未启动,但这不起作用。

想法?

4

0 回答 0