mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-25 18:40:06 -04:00
RaspberrypiOS now matches location of serve on Debian 12.
This commit is contained in:
parent
00579759cc
commit
a491ea7677
6 changed files with 6 additions and 21 deletions
|
|
@ -67,9 +67,11 @@ export const useLatestRequest = (delay = 300) => {
|
|||
// A hook which ignores older requests and will only set `data` to the latest response's data.
|
||||
// usage: sendRequest(async () => await yourAPICall(...args));
|
||||
|
||||
// The results from awaiting `fetchFunction`.
|
||||
const [data, setData] = React.useState(null);
|
||||
const latestRequestRef = React.useRef(0);
|
||||
const debounceTimerRef = React.useRef(null);
|
||||
// Loading while awaiting.
|
||||
const [loading, setLoading] = React.useState(false);
|
||||
|
||||
const sendRequest = React.useCallback((fetchFunction) => {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ sed -i 's/port = 5433/port = 5432/' /etc/postgresql/15/main/postgresql.conf
|
|||
mkdir /media/wrolpi
|
||||
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-api.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/debian12/wrolpi-app.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-app.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-kiwix.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi.target /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/renderd.conf /etc/renderd.conf
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
[Unit]
|
||||
Description=WROLPi React APP
|
||||
Wants=wrolpi-api.service
|
||||
PartOf=wrolpi.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/serve -s build -l 5000
|
||||
Group=wrolpi
|
||||
User=wrolpi
|
||||
WorkingDirectory=/opt/wrolpi/app/
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
|
|
@ -4,7 +4,7 @@ Wants=wrolpi-api.service
|
|||
PartOf=wrolpi.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/serve -s build -l 5000
|
||||
ExecStart=/usr/local/bin/serve -s build -l 5000
|
||||
Group=wrolpi
|
||||
User=wrolpi
|
||||
WorkingDirectory=/opt/wrolpi/app/
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ mkdir /media/wrolpi
|
|||
chown wrolpi:wrolpi /media/wrolpi
|
||||
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-api.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/debian12/wrolpi-app.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-app.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-kiwix.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi.target /etc/systemd/system/
|
||||
|
||||
|
|
|
|||
|
|
@ -44,11 +44,7 @@ visudo -c -f /etc/sudoers.d/90-wrolpi
|
|||
|
||||
# Install the systemd services
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-api.service /etc/systemd/system/
|
||||
if [[ ${rpi} == true ]]; then
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-app.service /etc/systemd/system/
|
||||
else
|
||||
cp /opt/wrolpi/etc/debian12/wrolpi-app.service /etc/systemd/system/
|
||||
fi
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-app.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi-kiwix.service /etc/systemd/system/
|
||||
cp /opt/wrolpi/etc/raspberrypios/wrolpi.target /etc/systemd/system/
|
||||
/usr/bin/systemctl daemon-reload
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue