31 lines
953 B
Bash
31 lines
953 B
Bash
#!/bin/bash
|
|
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# add postgrest as a systemd service / frode klevstul / oct 2025
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
if ! [ -f "/etc/systemd/system/postgrest.service" ]
|
|
then
|
|
|
|
useradd -M -U -d /nonexistent -s /usr/sbin/nologin postgrest
|
|
|
|
cd /tmp
|
|
|
|
# fwd service
|
|
wget -O postgrest_fwd.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_bm.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
|
|
|
|
fi
|