diff --git a/installer/files/ogrepo-api.service b/installer/files/ogrepo-api.service index 136de86..a1419c1 100644 --- a/installer/files/ogrepo-api.service +++ b/installer/files/ogrepo-api.service @@ -3,8 +3,8 @@ Description=Gunicorn instance to serve repo_api After=network.target [Service] -User=ogrepository -Group=ogrepository +User=%%OGREPOSITORY_USER%% +Group=%%OGREPOSITORY_USER%% WorkingDirectory=/opt/opengnsys/ogrepository/api ExecStart=/usr/bin/gunicorn -w 4 -b 0.0.0.0:8006 repo_api:app diff --git a/installer/installer.sh b/installer/installer.sh index b17bf42..7512684 100644 --- a/installer/installer.sh +++ b/installer/installer.sh @@ -70,6 +70,7 @@ install_external_packages() { install_ogrepo-api_service() { cp -r $DOWNLOAD_DIR/installer/files/ogrepo-api.service /etc/systemd/system/ogrepo-api.service + sed -i "s/%%OGREPOSITORY_USER%%/$OGUSER/g" /etc/systemd/system/ogrepo-api.service systemctl enable --now ogrepo-api }