diff options
author | Tom Richards | 2016-07-12 15:34:43 -0400 |
---|---|---|
committer | Tom Richards | 2016-07-12 15:34:43 -0400 |
commit | 06f93e3ee646423ccf305084efdc5b8caa167400 (patch) | |
tree | 414ead4879fad2545d4ee0527be8a7ae5faa6ce2 /solr.install | |
parent | 170b986420d0e0f8454837c03e33b07243529dca (diff) | |
download | aur-06f93e3ee646423ccf305084efdc5b8caa167400.tar.gz |
Update to Solr 6.1.0
Diffstat (limited to 'solr.install')
-rw-r--r-- | solr.install | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/solr.install b/solr.install index b87df293bf54..0fd55c6580c2 100644 --- a/solr.install +++ b/solr.install @@ -1,19 +1,30 @@ -post_install(){ - groupadd solr &>/dev/null - useradd -g solr -d /var/lib/solr -s /bin/false solr &>/dev/null - chown -R solr:solr var/lib/solr etc/solr &>/dev/null -} +print_core_message() { + cat <<EOT +Start the solr service first! + $ sudo systemctl restart solr -post_upgrade(){ - getent group solr >/dev/null 2>&1 || groupadd solr &>/dev/null - getent passwd solr >/dev/null 2>&1 || useradd -g solr -d /var/lib/solr -s /bin/false solr &>/dev/null +Then, create new Solr core(s) from the command line: + $ sudo -u solr -s /bin/bash + $ cd + $ bin/solr create_core -c new_core +EOT } -post_remove(){ - if getent passwd solr >/dev/null 2>&1; then - userdel solr +install_solr_user() { + if ! getent group solr >/dev/null; then + groupadd -g 114 solr fi - if getent group solr >/dev/null 2>&1; then - groupdel solr + if ! getent passwd solr >/dev/null; then + useradd -c 'Apache Solr user' -u 114 -g solr -d '/opt/solr' -s /bin/bash solr + passwd -l solr >/dev/null fi -}
\ No newline at end of file +} + +post_install() { + print_core_message + install_solr_user +} + +post_upgrade() { + post_install $1 +} |