3 Commits

Author SHA1 Message Date
4e22194124 fix: mkdir should not fail if data already exists
All checks were successful
Continuous Delivery / build_n_upload (push) Successful in 26s
Continuous Integration / lint_n_build (push) Successful in 25s
2026-06-11 12:34:40 +02:00
88a602f039 fix: chown recursive 2026-06-11 12:27:51 +02:00
ea2071c84a fix: usermod command typo 2026-06-11 12:00:56 +02:00

View File

@@ -31,7 +31,7 @@ if ! id nextcloud >/dev/null 2>&1; then
fi
# Add nextcloud to postgres and valkey groups
usermod --groups postgres,valkey --user nextcloud
usermod --groups postgres,valkey --append nextcloud
# Download nextcloud latest release
wget --output-document %{_tmppath}/nextcloud-latest.tar.bz2 https://download.nextcloud.com/server/releases/latest.tar.bz2
@@ -42,11 +42,11 @@ gpg --verify %{_tmppath}/nextcloud-latest.tar.bz2.asc %{_tmppath}/nextcloud-late
tar --extract --file=%{_tmppath}/nextcloud-latest.tar.bz2 --directory=%{_sharedstatedir}
# Change rights an owner
chown nextcloud:nextcloud %{_sharedstatedir}/nextcloud
chown --recursive nextcloud:nextcloud %{_sharedstatedir}/nextcloud
chmod 700 %{_sharedstatedir}/nextcloud
# Create data dir
runuser --user=nextcloud -- mkdir %{_sharedstatedir}/nextcloud/data
runuser --user=nextcloud -- mkdir --parents %{_sharedstatedir}/nextcloud/data
# Add link to config
runuser --user=nextcloud -- ln --symbolic --force %{_sysconfdir}/nextcloud/config.php %{_sharedstatedir}/nextcloud/config/config.php