Skip to content

Commit

Permalink
Show post-install message only on initial install
Browse files Browse the repository at this point in the history
  • Loading branch information
fschueller committed Jul 4, 2018
1 parent aa7c80c commit cb0d881
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,5 +1,5 @@
NAME = rmt-server
VERSION = 1.0.3
VERSION = 1.0.4

all:
@:
Expand Down
2 changes: 1 addition & 1 deletion lib/rmt.rb
@@ -1,5 +1,5 @@
module RMT
VERSION ||= '1.0.3'.freeze
VERSION ||= '1.0.4'.freeze

DEFAULT_USER = '_rmt'.freeze
DEFAULT_GROUP = 'nginx'.freeze
Expand Down
6 changes: 4 additions & 2 deletions package/rmt-server.spec
Expand Up @@ -25,7 +25,7 @@
%define is_sle_12_family 1
%endif
Name: rmt-server
Version: 1.0.3
Version: 1.0.4
Release: 0
Summary: Repository mirroring tool and registration proxy for SCC
License: GPL-2.0-or-later
Expand Down Expand Up @@ -219,7 +219,9 @@ getent passwd %{rmt_user} >/dev/null || \
%service_add_post rmt-server.target rmt-server.service rmt-server-migration.service rmt-server-mirror.service rmt-server-sync.service
cd %{_datadir}/rmt && runuser -u %{rmt_user} -g %{rmt_group} -- bin/rails secrets:setup >/dev/null
cd %{_datadir}/rmt && runuser -u %{rmt_user} -g %{rmt_group} -- bin/rails runner -e production "Rails::Secrets.write({'production' => {'secret_key_base' => SecureRandom.hex(64)}}.to_yaml)" >/dev/null
echo "Please run the YaST RMT module (or 'yast2 rmt' from the command line) to complete the configuration of your RMT" >> /dev/stdout
if [ $1 -eq 1 ] ; then
echo "Please run the YaST RMT module (or 'yast2 rmt' from the command line) to complete the configuration of your RMT" >> /dev/stdout
fi

%preun
%service_del_preun rmt-server.target rmt-server.service rmt-server-migration.service rmt-server-mirror.service rmt-server-sync.service
Expand Down

0 comments on commit cb0d881

Please sign in to comment.