Bugzilla – Attachment 6320 Details for
Bug 6684
koha-remove should check the number of arguments it gets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
A patch to the koha-remove script
koha-remove.patch (text/plain), 3.24 KB, created by
Simon Story
on 2011-11-16 17:48:42 UTC
(
hide
)
Description:
A patch to the koha-remove script
Filename:
MIME Type:
Creator:
Simon Story
Created:
2011-11-16 17:48:42 UTC
Size:
3.24 KB
patch
obsolete
>diff --git a/debian/scripts/koha-remove b/debian/scripts/koha-remove >index 10a8b78..c62558a 100755 >--- a/debian/scripts/koha-remove >+++ b/debian/scripts/koha-remove >@@ -19,9 +19,26 @@ > > set -e > >+NAMES="$@" > >-for name in "$@" >+SITECONFDIR="/etc/koha/sites" >+# There has to be a better way of excluding '.' from find. But this works. >+INSTANCES=`cd $SITECONFDIR && find . -type d -printf " %f" |sed s/\ .\ //` >+ >+if [ -z $NAMES ] ; then >+ echo "Please specify a Koha instance name. Your choices are:" >+ echo "$INSTANCES" >+ exit 1 >+fi >+ >+for name in $NAMES > do >+ # Does the directory (ie instance) name exist? >+ if [ ! -d $SITECONFDIR/$name ] ; then >+ echo Koha configuration directory for instance \"$name\" does not exist, please specify a valid Koha instance >+ exit 1 >+ fi >+ > echo "Removing Koha instance $name" > > mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof >@@ -32,12 +49,12 @@ eof > > koha-stop-zebra $name > rm "/etc/apache2/sites-available/$name" >- rm "/etc/koha/sites/$name/koha-conf.xml" >- rm "/etc/koha/sites/$name/zebra-biblios.cfg" >- rm "/etc/koha/sites/$name/zebra-authorities.cfg" >- rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg" >- rm "/etc/koha/sites/$name/zebra.passwd" >- rmdir "/etc/koha/sites/$name" >+ rm "$SITECONFDIR/$name/koha-conf.xml" >+ rm "$SITECONFDIR/$name/zebra-biblios.cfg" >+ rm "$SITECONFDIR/$name/zebra-authorities.cfg" >+ rm "$SITECONFDIR/$name/zebra-authorities-dom.cfg" >+ rm "$SITECONFDIR/$name/zebra.passwd" >+ rmdir "$SITECONFDIR/$name" > rm -r "/var/lock/koha/$name" > rm -r "/var/log/koha/$name" > rm -r "/var/run/koha/$name"diff --git a/debian/scripts/koha-remove b/debian/scripts/koha-remove >index 10a8b78..c62558a 100755 >--- a/debian/scripts/koha-remove >+++ b/debian/scripts/koha-remove >@@ -19,9 +19,26 @@ > > set -e > >+NAMES="$@" > >-for name in "$@" >+SITECONFDIR="/etc/koha/sites" >+# There has to be a better way of excluding '.' from find. But this works. >+INSTANCES=`cd $SITECONFDIR && find . -type d -printf " %f" |sed s/\ .\ //` >+ >+if [ -z $NAMES ] ; then >+ echo "Please specify a Koha instance name. Your choices are:" >+ echo "$INSTANCES" >+ exit 1 >+fi >+ >+for name in $NAMES > do >+ # Does the directory (ie instance) name exist? >+ if [ ! -d $SITECONFDIR/$name ] ; then >+ echo Koha configuration directory for instance \"$name\" does not exist, please specify a valid Koha instance >+ exit 1 >+ fi >+ > echo "Removing Koha instance $name" > > mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof >@@ -32,12 +49,12 @@ eof > > koha-stop-zebra $name > rm "/etc/apache2/sites-available/$name" >- rm "/etc/koha/sites/$name/koha-conf.xml" >- rm "/etc/koha/sites/$name/zebra-biblios.cfg" >- rm "/etc/koha/sites/$name/zebra-authorities.cfg" >- rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg" >- rm "/etc/koha/sites/$name/zebra.passwd" >- rmdir "/etc/koha/sites/$name" >+ rm "$SITECONFDIR/$name/koha-conf.xml" >+ rm "$SITECONFDIR/$name/zebra-biblios.cfg" >+ rm "$SITECONFDIR/$name/zebra-authorities.cfg" >+ rm "$SITECONFDIR/$name/zebra-authorities-dom.cfg" >+ rm "$SITECONFDIR/$name/zebra.passwd" >+ rmdir "$SITECONFDIR/$name" > rm -r "/var/lock/koha/$name" > rm -r "/var/log/koha/$name" > rm -r "/var/run/koha/$name"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 6684
:
6320
|
6336
|
9003
|
9533