File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change 8282 cat /usr/local/etc/instance.cfg
8383}
8484
85+ systemctl is-enabled -q
[email protected] || {
86+ max=" $( nproc || echo ' 2' ) "
87+ max=" $(( max- 1 )) "
88+ for i in $( seq 1 " $max " )
89+ do
90+ systemctl enable --now " nextcloud-ai-worker@${i} .service"
91+ done
92+ }
8593
8694exit 0
Original file line number Diff line number Diff line change 8383 update-rc.d redis-server enable
8484 clear_opcache
8585
86+ # NC service workers
87+ cat
> /etc/systemd/system/
[email protected] << 'EOF '88+ [Unit]
89+ Description=Nextcloud AI worker %i
90+ After=network.target
91+
92+ [Service]
93+ ExecStart=php occ background-job:worker -t 60 'OC\\TaskProcessing\\SynchronousBackgroundJob'
94+ Restart=always
95+ StartLimitInterval=60
96+ StartLimitBurst=10
97+ WorkingDirectory=/var/www/nextcloud
98+ User=www-data
99+
100+ [Install]
101+ WantedBy=multi-user.target
102+ EOF
103+
104+
86105 # service to randomize passwords on first boot
87106 mkdir -p /usr/lib/systemd/system
88107 cat > /usr/lib/systemd/system/nc-provisioning.service << 'EOF '
Original file line number Diff line number Diff line change 55 ncc app:disable app_api
66fi
77
8+ cat
> /etc/systemd/system/
[email protected] << 'EOF '9+ [Unit]
10+ Description=Nextcloud AI worker %i
11+ After=network.target
12+
13+ [Service]
14+ ExecStart=php occ background-job:worker -t 60 'OC\\TaskProcessing\\SynchronousBackgroundJob'
15+ Restart=always
16+ StartLimitInterval=60
17+ StartLimitBurst=10
18+ WorkingDirectory=/var/www/nextcloud
19+ User=www-data
20+
21+ [Install]
22+ WantedBy=multi-user.target
23+ EOF
24+ max=" $( nproc || echo ' 2' ) "
25+ max=" $(( max- 1 )) "
26+ for i in $( seq 1 " $max " )
27+ do
28+ systemctl enable --now " nextcloud-ai-worker@${i} .service"
29+ done
30+
831exit 0
You can’t perform that action at this time.
0 commit comments