RaspberrypiOS now matches location of serve on Debian 12.

This commit is contained in:
Roland 2023-11-22 10:47:10 -07:00
parent 00579759cc
commit a491ea7677
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
6 changed files with 6 additions and 21 deletions

View file

@ -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) => {

View file

@ -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

View file

@ -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

View file

@ -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/

View file

@ -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/

View file

@ -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