summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-07-19 17:34:15 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-07-19 17:34:15 -0300
commite944121c2fd9258d909f39943d90bcaa312eff41 (patch)
tree38c052ff61b46c4db3e417025c9df9ec5e5a005a
parent3e2b0ddfe4b24c97e5ad40af31aa21357766df30 (diff)
downloadpuppet-wordpress-e944121c2fd9258d909f39943d90bcaa312eff41.tar.gz
puppet-wordpress-e944121c2fd9258d909f39943d90bcaa312eff41.tar.bz2
Enchancing user experience of wordpress script
-rw-r--r--manifests/init.pp6
-rw-r--r--templates/wordpress.sh.erb9
2 files changed, 13 insertions, 2 deletions
diff --git a/manifests/init.pp b/manifests/init.pp
index f454ce5..aa24593 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -22,6 +22,12 @@ class wordpress {
mode => 755,
}
+ file { "/usr/local/sbin/wp":
+ ensure => '/usr/local/sbin/wordpress',
+ owner => root,
+ group => root,
+ }
+
vcsrepo { "/usr/local/share/wp-cli":
ensure => present,
provider => git,
diff --git a/templates/wordpress.sh.erb b/templates/wordpress.sh.erb
index a6626c6..02b97e2 100644
--- a/templates/wordpress.sh.erb
+++ b/templates/wordpress.sh.erb
@@ -128,7 +128,11 @@ function wordpress_upgrade {
# Usage
function wordpress_usage {
- echo "Usage: `basename $0` <deploy|upgrade> [arguments]"
+ /usr/local/share/wp-cli/src/bin/wp help
+ echo ""
+ echo "Installation management commands:"
+ echo " wp deploy <version>"
+ echo " wp upgrade <old-version> <new-version>"
}
# Main procedure
@@ -143,7 +147,8 @@ elif [ "$1" == "upgrade" ]; then
wordpress_upgrade $*
elif [ "$1" == "help" ]; then
wordpress_usage
- /usr/local/share/wp-cli/src/bin/wp help
+elif [ "$1" == "core" ]; then
+ echo "Please use deploy or upgrade instead."
else
# Send all other requests to wp-cli
/usr/local/share/wp-cli/src/bin/wp $*