patch issues with package

This commit is contained in:
Will Sinatra 2023-09-03 14:55:05 -04:00
parent fe997c5136
commit d53c3103b7
3 changed files with 29 additions and 2 deletions

View File

@ -102,6 +102,18 @@ php_fpm_activate() {
ln -s /etc/$php_ver/conf-available/$1.conf /etc/$php_ver/php-fpm.conf
}
#Usage: grocy_conf
#Variables:
grocy_conf() {
#Grocy expacts to be able to write to this path, should probably be fixed in the Alpine package.
chmod 0775 /usr/share/webapps/grocy/data/viewcache
chmod 0775 /var/lib/webapps/grocy/
sqlite3 /usr/share/webapps/grocy/data/grocy.db "VACUUM;"
chmod 0775 /usr/share/webapps/grocy/data/grocy.db
chown root:www-data /usr/share/webapps/grocy/data/grocy.db
}
#Usage: enable_services default 'lighttpd rsyslog samba iptables'
enable_services() {
for service in $2; do
@ -123,6 +135,7 @@ apply_crontab
nginx_activate grocy_nginx
nginx_deactivate default
php_fpm_activate grocy_nginx_fpm
grocy_conf
enable_services boot "syslog-ng"
enable_services default "crond iptables nginx php-fpm8"
enable_services default "crond iptables nginx php-fpm81"
reboot_system

11
Tasks/grocy_conf Normal file
View File

@ -0,0 +1,11 @@
#Usage: grocy_conf
#Variables:
grocy_conf() {
#Grocy expacts to be able to write to this path, should probably be fixed in the Alpine package.
chmod 0775 /usr/share/webapps/grocy/data/viewcache
chmod 0775 /var/lib/webapps/grocy/
sqlite3 /usr/share/webapps/grocy/data/grocy.db "VACUUM;"
chmod 0775 /usr/share/webapps/grocy/data/grocy.db
chown root:www-data /usr/share/webapps/grocy/data/grocy.db
}

View File

@ -29,10 +29,13 @@ Tasks:
- Path: Tasks/php_fpm_activate
Invo:
- 'php_fpm_activate grocy_nginx_fpm'
- Path: Tasks/grocy_conf
Invo:
- 'grocy_conf'
- Path: Tasks/enable_services
Invo:
- 'enable_services boot "syslog-ng"'
- 'enable_services default "crond iptables nginx php-fpm8"'
- 'enable_services default "crond iptables nginx php-fpm81"'
- Path: Tasks/reboot_system
Invo:
- 'reboot_system'