如何在 Ubuntu 中升级应用程序后更新 product.conf 文件

How to update product.conf file after upgrade application in Ubuntu

我有一个在启动时启动产品应用程序的 conf 文件产品。

应用程序文件夹结构:

home/
    jamnes/
          product/
                run.sh

product.conf 文件:

# Product start file
#
# Starts the Product App and respawns when it quits

description     " Product Application"

start on desktop-session-start
stop on runlevel [!2345]

respawn
exec /home/james/product/run.sh

如果用户升级应用程序,我们将放置新版本不同的结构

home/
    jamnes/
           product/
                  run.sh
           new/
              product/
                     run.sh

问题:

如何从 product.conf 文件指向新版本产品

exec /home/james/new/product/run.sh

我会在“/home/jamnes/product”中使用符号链接 current 指向产品的当前版本。但是你的问题与暴发户或 ubuntu 完全无关。