mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-03 07:40:52 +02:00
addition of nextcloud and transmission based on linuxserver
This commit is contained in:
39
nextcloud/root/etc/cont-init.d/10-adduser
Normal file
39
nextcloud/root/etc/cont-init.d/10-adduser
Normal file
@@ -0,0 +1,39 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
PUID=${PUID:-911}
|
||||
PGID=${PGID:-911}
|
||||
|
||||
groupmod -o -g "$PGID" abc
|
||||
usermod -o -u "$PUID" abc
|
||||
mkdir -p /data/config
|
||||
mkdir -p /share/nextcloud
|
||||
echo '
|
||||
-------------------------------------
|
||||
_ ()
|
||||
| | ___ _ __
|
||||
| | / __| | | / \
|
||||
| | \__ \ | | | () |
|
||||
|_| |___/ |_| \__/
|
||||
|
||||
|
||||
Brought to you by linuxserver.io
|
||||
-------------------------------------'
|
||||
if [[ -f /donate.txt ]]; then
|
||||
echo '
|
||||
To support the app dev(s) visit:'
|
||||
cat /donate.txt
|
||||
fi
|
||||
echo '
|
||||
To support LSIO projects visit:
|
||||
https://www.linuxserver.io/donate/
|
||||
-------------------------------------
|
||||
GID/UID
|
||||
-------------------------------------'
|
||||
echo "
|
||||
User uid: $(id -u abc)
|
||||
User gid: $(id -g abc)
|
||||
-------------------------------------
|
||||
"
|
||||
chown abc:abc /app
|
||||
chown abc:abc /data/config
|
||||
chown abc:abc /defaults
|
||||
11
nextcloud/root/etc/cont-init.d/30-keygen
Normal file
11
nextcloud/root/etc/cont-init.d/30-keygen
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
/defaults/nextcloud-perms.sh
|
||||
SUBJECT="/C=US/ST=CA/L=Carlsbad/O=Linuxserver.io/OU=LSIO Server/CN=*"
|
||||
if [[ -f /ssl/nextcloud/keys/cert.key && -f /ssl/nextcloud/keys/cert.crt ]]; then
|
||||
echo "using keys found in /ssl/nextcloud/keys"
|
||||
else
|
||||
echo "generating self-signed keys in /ssl/nextcloud/keys, you can replace these with your own keys if required"
|
||||
openssl req -new -x509 -days 3650 -nodes -out /ssl/nextcloud/keys/cert.crt -keyout /ssl/nextcloud/keys/cert.key -subj "$SUBJECT"
|
||||
fi
|
||||
|
||||
|
||||
8
nextcloud/root/etc/cont-init.d/40-config
Normal file
8
nextcloud/root/etc/cont-init.d/40-config
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# permissions
|
||||
chown abc:abc \
|
||||
/data/config/nextcloud/config \
|
||||
/data/config/nextcloud/data
|
||||
chown -R abc:abc \
|
||||
/var/lib/nginx
|
||||
21
nextcloud/root/etc/cont-init.d/50-install
Normal file
21
nextcloud/root/etc/cont-init.d/50-install
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# create folders
|
||||
mkdir -p \
|
||||
"${NEXTCLOUD_PATH}" \
|
||||
/data/config/crontabs
|
||||
|
||||
# install app
|
||||
if [ ! -e "${NEXTCLOUD_PATH}/index.php" ]; then
|
||||
tar xf /app/nextcloud.tar.bz2 -C \
|
||||
"${NEXTCLOUD_PATH}" --strip-components=1
|
||||
chown abc:abc -R \
|
||||
"${NEXTCLOUD_PATH}"
|
||||
chmod +x "${NEXTCLOUD_PATH}/occ"
|
||||
fi
|
||||
|
||||
# set cronjob
|
||||
[[ ! -f /data/config/crontabs/root ]] && \
|
||||
cp /defaults/root /data/config/crontabs/root
|
||||
cp /data/config/crontabs/root /etc/crontabs/root
|
||||
|
||||
9
nextcloud/root/etc/cont-init.d/60-memcache
Normal file
9
nextcloud/root/etc/cont-init.d/60-memcache
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# copy config
|
||||
[[ ! -f /data/config/www/nextcloud/config/config.php ]] && \
|
||||
cp /defaults/config.php /data/config/www/nextcloud/config/config.php
|
||||
|
||||
# permissions
|
||||
chown abc:abc \
|
||||
/data/config/www/nextcloud/config/config.php
|
||||
3
nextcloud/root/etc/services.d/cron/run
Normal file
3
nextcloud/root/etc/services.d/cron/run
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
/usr/sbin/crond -f -S -l 0 -c /etc/crontabs
|
||||
Reference in New Issue
Block a user