This repository was archived by the owner on Oct 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstallNextcloudApps.sh
More file actions
68 lines (55 loc) · 2.71 KB
/
installNextcloudApps.sh
File metadata and controls
68 lines (55 loc) · 2.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Copyright (C) 2017 Tetras Libre <admin@tetras-libre.fr>
# Author: Curt, Sebastien <Sebastien.Curt@tetras-libre.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
NEXTCLOUD_INSTALL_DIR="/var/www/nextcloud/"
NEXTCLOUD_APPS_DIR="${NEXTCLOUD_INSTALL_DIR}apps/"
# Take 2 parameters: app_id app_url
install_app () {
application=$1
url=$2
archive=`echo $url | sed 's@^.*/\(.*\)$@\1@'`
echo "INSTALL ${application}"
echo "\tDownload ${application} from ${url}"
wget "${url}"
echo "\tDownload ${application} : terminated, code $?"
echo "\tExtract ${application}"
tar xzf ${PWD}/${archive}
echo "\tExtract ${application} : terminated, code $?"
echo "\tMove extracted file to ${NEXTCLOUD_APPS_DIR}"
cp -r --verbose ${PWD}/${application} ${NEXTCLOUD_APPS_DIR}
echo "\tMove extracted file to ${NEXTCLOUD_APPS_DIR} : terminated, code $?"
chown -R www-data:www-data ${NEXTCLOUD_APPS_DIR}${application}
sudo -u www-data php ${NEXTCLOUD_INSTALL_DIR}occ app:enable ${application}
echo "\tEnable ${application} : terminated, code $?"
rm -r ${PWD}/${application}*
}
# Install tasks
install_app "tasks" "https://github.com/nextcloud/tasks/releases/download/v0.9.4/tasks.tar.gz"
# Install news
install_app "news" "https://github.com/nextcloud/news/releases/download/10.1.0/news.tar.gz"
# Install direct_menu
install_app "direct_menu" "https://github.com/juliushaertl/direct_menu/releases/download/0.9.3/direct_menu.tar.gz"
# Install keeweb
install_app "keeweb" "https://github.com/jhass/nextcloud-keeweb/releases/download/v0.3.0/keeweb-0.3.0.tar.gz"
# Install calendar
install_app "calendar" "https://github.com/nextcloud/calendar/releases/download/v1.4.1/calendar.tar.gz"
# Install contacts
install_app "contacts" "https://github.com/nextcloud/contacts/releases/download/v1.5.2/contacts.tar.gz"
# Install Markdown editor
install_app "files_markdown" "https://github.com/icewind1991/files_markdown/releases/download/v1.0.0/files_markdown.tar.gz"
# Install Markdown editor
install_app "mail" "https://github.com/nextcloud/mail/releases/download/nightly-20170117/mail.tar.gz"
unset NEXTCLOUD_INSTALL_DIR
unset NEXTCLOUD_APPS_DIR