Install Postgrest
Install as a service
Create a postgrest.service file at /etc/systemd/system/
[Unit]
Description=Postgrest Service
After=syslog.target
After=network.target
After=postgresql.service
[Service]
ExecStart=/usr/local/bin/postgrest /usr/local/bin/config_erp201702.ini
[Install]
WantedBy=multi-user.target
start a service
--
sudo systemctl start postgrest.service
stop service
sudo systemctl stop postgrest.service
check service status
sudo systemctl status postgrest.service
enable autostart service
sudo systemctl enable postgrest.service
disable autostart service
sudo systemctl disable postgrest.service
reload config after postgrest.service is changed
sudo systemctl daemon-reload
check log
journalctl -u postgrest.service
journalctl -u postgrest.service --since yesterday
journalctl -u postgrest.service --since "2018-01-01" --until "2018-01-31"