Skip to content

Commit

Permalink
added service definition to lrs_install
Browse files Browse the repository at this point in the history
  • Loading branch information
Henk Reder authored and Henk Reder committed Mar 22, 2024
1 parent 817bf27 commit 06bff38
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion dev-resources/ami/components/lrs_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,23 @@ phases:
action: ExecuteBash
inputs:
commands:
- unzip /tmp/lrsql.zip -d /opt/lrsql/
- unzip /tmp/lrsql.zip -d /opt/lrsql/
- name: DefineSystemService
inputs:
commands:
- |
cat << EOF > /lib/systemd/system/lrsql.service
[Unit]
Description=SQL LRS Service
[Service]
User=root
Environment="LC_ALL=en_US.UTF-8"
WorkingDirectory=/opt/lrsql
ExecStart=/opt/lrsql/bin/run_postgres.sh
SuccessExitStatus=143
TimeoutStopSec=10
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
EOF

0 comments on commit 06bff38

Please sign in to comment.