fix: some bugs in rpm spec
This commit is contained in:
@@ -66,8 +66,7 @@ fi
|
|||||||
chown --recursive nextcloud:nextcloud /var/www/nextcloud
|
chown --recursive nextcloud:nextcloud /var/www/nextcloud
|
||||||
chmod 755 /var/www/nextcloud
|
chmod 755 /var/www/nextcloud
|
||||||
|
|
||||||
# Create symbolic links to data and config
|
# Create symbolic link to config
|
||||||
runuser --user=nextcloud -- ln --symbolic --force %{_sharedstatedir}/nextcloud/data /var/www/nextcloud/data
|
|
||||||
runuser --user=nextcloud -- ln --symbolic --force %{_sysconfdir}/nextcloud/config.php /var/www/nextcloud/config/config.php
|
runuser --user=nextcloud -- ln --symbolic --force %{_sysconfdir}/nextcloud/config.php /var/www/nextcloud/config/config.php
|
||||||
|
|
||||||
# Restart services
|
# Restart services
|
||||||
@@ -79,12 +78,9 @@ systemctl restart nginx.service php-fpm.service
|
|||||||
# Display commands and exit on error
|
# Display commands and exit on error
|
||||||
set -xe
|
set -xe
|
||||||
|
|
||||||
# Stop service
|
|
||||||
systemctl stop php-fpm
|
|
||||||
|
|
||||||
# If uninstalling, then delete user and db
|
# If uninstalling, then delete user and db
|
||||||
if [ $1 == 0 ]; then
|
if [ $1 == 0 ]; then
|
||||||
if id nextcloud; then
|
if id nextcloud >/dev/null 2>&1; then
|
||||||
userdel --force --remove nextcloud
|
userdel --force --remove nextcloud
|
||||||
fi
|
fi
|
||||||
if runuser --user=postgres -- psql --quiet --tuples-only --command='\l' | grep --quiet nextcloud; then
|
if runuser --user=postgres -- psql --quiet --tuples-only --command='\l' | grep --quiet nextcloud; then
|
||||||
@@ -93,18 +89,16 @@ if [ $1 == 0 ]; then
|
|||||||
if runuser --user=postgres -- psql --quiet --tuples-only --command='\du' | grep --quiet nextcloud; then
|
if runuser --user=postgres -- psql --quiet --tuples-only --command='\du' | grep --quiet nextcloud; then
|
||||||
runuser --user=postgres -- dropuser nextcloud
|
runuser --user=postgres -- dropuser nextcloud
|
||||||
fi
|
fi
|
||||||
|
rm --recursive --force /var/www/nextcloud
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%dir %attr(755, root, root) %{_sysconfdir}/nextcloud
|
%dir %attr(755, root, root) %{_sysconfdir}/nextcloud
|
||||||
%attr(644, root, root) %{_sysconfdir}/nextcloud/config.php.tpl
|
%attr(644, root, root) %{_sysconfdir}/nextcloud/config.php.tpl
|
||||||
%attr(640, root, -) %{_sysconfdir}/nextcloud/config.php
|
|
||||||
|
|
||||||
%attr(644, root, root) %{_sysconfdir}/nginx/conf.d/cloud.netoik.io.conf
|
%attr(644, root, root) %{_sysconfdir}/nginx/conf.d/cloud.netoik.io.conf
|
||||||
|
|
||||||
%attr(644, root, root) %{_sysconfdir}/php-fpm.d/nextcloud.conf
|
%attr(644, root, root) %{_sysconfdir}/php-fpm.d/nextcloud.conf
|
||||||
|
|
||||||
%dir %attr(700, -, -) /var/www/nextcloud
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
%autochangelog
|
%autochangelog
|
||||||
|
|||||||
Reference in New Issue
Block a user