3. Update the PUN Utility¶
The PUN utility is maintained by the nginx_stage project. Assuming you previously installed it with Install the PUN Utility you can update it with the following directions.
3.1. Do I need to update?¶
Latest version: v0.2.1
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.2.1
where the version number should be given at the end of the line. If the version numbers match then you can skip this update.
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.2.1
Install it to its global location:
sudo scl enable rh-ruby22 -- rake install # => mkdir -p /opt/ood/nginx_stage # => cp ...
Note
This will not override your previous configuration file located at:
/opt/ood/nginx_stage/config/nginx_stage.yml
as well as the ruby binstub/wrapper script located at:
/opt/ood/nginx_stage/bin/ood_ruby
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.