Files
srv-pub/scr/2b_postgrest_service.sh
2025-12-09 19:44:28 -05:00

21 lines
616 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
wget -O postgrest.service https://gi.op.fo/fro/srv-pub/raw/branch/trunk/cfg/pgr/postgrest.service
cp postgrest.service /etc/systemd/system/
systemctl enable postgrest
systemctl start postgrest
systemctl status postgrest
fi