fix(labca): remove blocking -init call and system user
The labca-gui -init flag does not exit after initialization - it starts the HTTP server and blocks forever, causing the install to hang. Removed the -init call; the service handles first-run setup via the browser /setup route automatically. Also removed system user (runs as root in LXC).
This commit is contained in:
@@ -15,15 +15,9 @@ update_os
|
|||||||
|
|
||||||
fetch_and_deploy_gh_release "labca-gui" "hakwerk/labca" "binary"
|
fetch_and_deploy_gh_release "labca-gui" "hakwerk/labca" "binary"
|
||||||
|
|
||||||
msg_info "Configuring LabCA"
|
|
||||||
mkdir -p /etc/labca
|
mkdir -p /etc/labca
|
||||||
$STD labca-gui -config /etc/labca/config.json -port 3000 -init
|
|
||||||
msg_ok "Configured LabCA"
|
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
useradd --system --home /etc/labca --shell /bin/false labca
|
|
||||||
chown -R labca:labca /etc/labca
|
|
||||||
|
|
||||||
cat <<EOF >/etc/systemd/system/labca.service
|
cat <<EOF >/etc/systemd/system/labca.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=LabCA GUI Service
|
Description=LabCA GUI Service
|
||||||
@@ -34,10 +28,8 @@ StartLimitBurst=3
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=labca
|
|
||||||
Group=labca
|
|
||||||
WorkingDirectory=/etc/labca
|
WorkingDirectory=/etc/labca
|
||||||
ExecStart=/usr/bin/labca-gui -config /etc/labca/config.json
|
ExecStart=/usr/bin/labca-gui -config /etc/labca/config.json -port 3000
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=5
|
RestartSec=5
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user