From 503066892d494f9071c6e0547d64993388570703 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 14 Oct 2019 16:37:37 +0200 Subject: [PATCH 1/2] Add script to delete an account (ref #64) --- scripts/delete-account.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 scripts/delete-account.sh diff --git a/scripts/delete-account.sh b/scripts/delete-account.sh new file mode 100644 index 0000000..cd143ce --- /dev/null +++ b/scripts/delete-account.sh @@ -0,0 +1,12 @@ +#!/bin/sh +set -e + +source /mnt/repo-base/scripts/base.sh + +ACCOUNT=$1 + +docker-compose exec -T -u www-data nextcloud php occ user:delete "$ACCOUNT" + +docker-compose exec -T postfixadmin /postfixadmin/scripts/postfixadmin-cli mailbox delete "$ACCOUNT" + +# TODO: delete onlyoffice account??? -- GitLab From 862af81d1614080a9faccab746a6a15c3cd8a97a Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Mon, 4 Nov 2019 11:44:50 +0100 Subject: [PATCH 2/2] use bash --- scripts/delete-account.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 scripts/delete-account.sh diff --git a/scripts/delete-account.sh b/scripts/delete-account.sh old mode 100644 new mode 100755 index cd143ce..362232b --- a/scripts/delete-account.sh +++ b/scripts/delete-account.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -e source /mnt/repo-base/scripts/base.sh -- GitLab