1.3. Update the PUN Utility¶
1.3.1. Do I need to update?¶
You can compare this to the locally installed nginx_stage with the following command:
/opt/ood/nginx_stage/sbin/nginx_stage -v #=> nginx_stage, version 0.3.0
where the version number should be given at the end of the line. If the version numbers match then you can skip this update.
1.3.2. Instructions to update¶
Fetch the latest changes and check out the latest tag:
cd ~/ood/src/nginx_stage scl enable git19 -- git fetch scl enable git19 -- git checkout v0.3.0
Install it to its global location:
sudo scl enable rh-ruby22 -- rake install # => mkdir -p /opt/ood/nginx_stage # => cp ...
Previous versions kept the nginx_stage YAML configuration file underneath the installation path:
This is not ideal, so for ALL future versions the YAML configuration will need to be moved to:
If you have a custom configuration file you will NEED to move this:
sudo mv /opt/ood/nginx_stage/config/nginx_stage.yml /etc/ood/config/nginx_stage.yml
This is a one-time operation and will not need to be performed again after this.
Clean up app configuration files that point to nonexistant apps:
sudo /opt/ood/nginx_stage/sbin/nginx_stage app_clean
Rebuild all the app configuration files in case the template has changed:
sudo /opt/ood/nginx_stage/sbin/nginx_stage app_reset --sub-uri=/pun
Shutdown all user PUNs that do not currently have active connections:
sudo /opt/ood/nginx_stage/sbin/nginx_stage nginx_clean
This is so that the user configuration files are regenerated when the user’s PUN starts back up. Any PUNs that do not get shutdown (they had an active connection) will eventually be shutdown when the user eventually disconnects due to the cron job.