Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Maybe you should rethink how you deploy your software to the production server:</p> <ol> <li><p>Compiling software should be done in your development environment, not on the production server. There's no need to install compilers on production servers. And there are a lot of reasons not to do it (mainly security reasons).</p></li> <li><p>Use a package management system to deploy your software. If you're on linux use deb, rpm, or whatever package manger is used by your distribution. This will give you full control on what version is installed, and also provide dependency features.</p></li> <li><p>The package that installs your software should bring with it all the files your software needs (unless these files can be provided by other packages), and also set up users, directories, permissions, and anything else your software needs.</p></li> <li><p>Basically you can write your bash script in the post install and post remove section of the package. </p></li> <li><p>Make sure to test that once installed, the package brings and creates everything needed to run the program, and that uninstalling the package, removes all the files, and undoes what the postinstall script did.</p></li> <li><p>Make sure upgrading the package from version X to X+1 works as expected.</p></li> </ol> <p>Regarding the script itself. You should of course check for exit status of the commands you run. You can use a <a href="https://stackoverflow.com/questions/372116/what-is-the-best-way-to-write-a-wrapper-function-that-runs-commands-and-logs-thei">Wrapper script</a> so that you don't have to repeat the exit code checking, and logging for each command.</p> <p>Good luck!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload