Files
srv-pub/scr/2b_postgrest_service.sh

32 lines
952 B
Bash
Raw Normal View History

2025-10-26 21:56:12 -05:00
#!/bin/bash
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2025-10-28 13:01:10 -05:00
# add postgrest as a systemd service / frode klevstul / oct 2025
2025-10-26 21:56:12 -05:00
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2025-10-28 12:56:34 -05:00
if ! [ -f "/etc/systemd/system/postgrest.service" ]
then
2025-10-26 21:56:12 -05:00
2025-10-28 12:56:34 -05:00
useradd -M -U -d /nonexistent -s /usr/sbin/nologin postgrest
2025-10-26 21:56:12 -05:00
2025-10-28 12:56:34 -05:00
cd /tmp
# fwd service
wget -O postgrest.service https://gi.op.fo/fro/srv-pub/raw/branch/trunk/cfg/pgr/postgrest_fwd.service
cp postgrest_fwd.service /etc/systemd/system/
systemctl enable postgrest_fwd
systemctl start postgrest_fwd
systemctl status postgrest_fwd
# boquete marketplace service
#wget -O postgrest.service https://gi.op.fo/fro/srv-pub/raw/branch/trunk/cfg/pgr/postgrest_bm.service
#cp postgrest_bm.service /etc/systemd/system/
#systemctl enable postgrest_bm
#systemctl start postgrest_bm
#systemctl status postgrest_bm
2025-10-28 12:56:34 -05:00
fi