projects
/
koha-ffzg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 21903: (follow-up) koha-dump can export uploaded and temporary uploaded files
[koha-ffzg.git]
/
debian
/
scripts
/
koha-remove
diff --git
a/debian/scripts/koha-remove
b/debian/scripts/koha-remove
index
67e2402
..
7270661
100755
(executable)
--- a/
debian/scripts/koha-remove
+++ b/
debian/scripts/koha-remove
@@
-65,12
+65,9
@@
do
mysql_hostname="localhost"
if [ "$keepmysql" != "1" ]
then
mysql_hostname="localhost"
if [ "$keepmysql" != "1" ]
then
- # The grant creates the user in case it isn't, we don't want our loop to fail if it has already being deleted.
mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof
mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof
-GRANT USAGE ON \`koha_$name\`.* TO \`koha_$name\`@\`%\`;
-GRANT USAGE ON \`koha_$name\`.* TO \`koha_$name\`@\`$mysql_hostname\`;
-DROP USER \`koha_$name\`@\`%\`;
-DROP USER \`koha_$name\`@\`$mysql_hostname\`;
+DROP USER IF EXISTS \`koha_$name\`@\`%\`;
+DROP USER IF EXISTS \`koha_$name\`@\`$mysql_hostname\`;
DROP DATABASE IF EXISTS \`koha_$name\`;
FLUSH PRIVILEGES;
eof
DROP DATABASE IF EXISTS \`koha_$name\`;
FLUSH PRIVILEGES;
eof
@@
-78,16
+75,24
@@
eof
# Stop the Zebra server if needed
if is_zebra_running $name; then
# Stop the Zebra server if needed
if is_zebra_running $name; then
- koha-
stop-zebra
$name || /bin/true
+ koha-
zebra --stop
$name || /bin/true
fi
# Stop the indexer daemon if needed
if is_indexer_running $name; then
koha-indexer --stop $name || /bin/true
fi
fi
# Stop the indexer daemon if needed
if is_indexer_running $name; then
koha-indexer --stop $name || /bin/true
fi
+ # Stop the worker daemon if needed
+ if is_worker_running $name; then
+ koha-worker --stop $name || /bin/true
+ fi
# Stop the Plack server if needed
if is_plack_running $name; then
koha-plack --stop $name || /bin/true
fi
# Stop the Plack server if needed
if is_plack_running $name; then
koha-plack --stop $name || /bin/true
fi
+ # Stop the SIP server if needed
+ if is_sip_running $name; then
+ koha-sip --stop $name || /bin/true
+ fi
instancefile=$(get_apache_config_for $name)
le_opacdomain=$(letsencrypt_get_opacdomain_for $name)
instancefile=$(get_apache_config_for $name)
le_opacdomain=$(letsencrypt_get_opacdomain_for $name)
@@
-108,6
+113,12
@@
eof
rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg"
[ -f "/etc/koha/sites/$name/zebra.passwd" ] && \
rm "/etc/koha/sites/$name/zebra.passwd"
rm "/etc/koha/sites/$name/zebra-authorities-dom.cfg"
[ -f "/etc/koha/sites/$name/zebra.passwd" ] && \
rm "/etc/koha/sites/$name/zebra.passwd"
+
+ tempdir=$(get_tmpdir)
+ [ -d "$tempdir/koha_${name}_upload" ] && \
+ # Temporary uploads can be discarded, apart from purgeall
+ rm -r "$tempdir/koha_${name}_upload"
+
[ -f "/var/lib/koha/$name/letsencrypt.enabled" ] && \
rm -r "/var/lib/koha/$name/letsencrypt.enabled"
[ -f "/etc/letsencrypt/renewal/$le_opacdomain.conf" ] && \
[ -f "/var/lib/koha/$name/letsencrypt.enabled" ] && \
rm -r "/var/lib/koha/$name/letsencrypt.enabled"
[ -f "/etc/letsencrypt/renewal/$le_opacdomain.conf" ] && \
@@
-119,6
+130,8
@@
eof
rm -r "/var/lock/koha/$name"
[ -d "/var/log/koha/$name" ] && \
rm -r "/var/log/koha/$name"
rm -r "/var/lock/koha/$name"
[ -d "/var/log/koha/$name" ] && \
rm -r "/var/log/koha/$name"
+ [ -d "/var/cache/koha/$name" ] && \
+ rm -r "/var/cache/koha/$name"
[ -d "/var/run/koha/$name" ] && \
rm -r "/var/run/koha/$name"
[ "$purgeall" = "1" ] && [ -d "/var/lib/koha/$name" ] && \
[ -d "/var/run/koha/$name" ] && \
rm -r "/var/run/koha/$name"
[ "$purgeall" = "1" ] && [ -d "/var/lib/koha/$name" ] && \