diff --git a/tools/packer/lotus.pkr.hcl b/tools/packer/lotus.pkr.hcl index 95d93f4ae..347cfb948 100644 --- a/tools/packer/lotus.pkr.hcl +++ b/tools/packer/lotus.pkr.hcl @@ -76,10 +76,6 @@ build { source = "./tools/packer/systemd/lotus-miner.service" destination = "lotus-miner.service" } - provisioner "file" { - source = "./tools/packer/systemd/lotus-init.service" - destination = "lotus-init.service" - } provisioner "file" { source = "./tools/packer/homedir/LOTUS.txt" destination = "LOTUS.txt" diff --git a/tools/packer/systemd/lotus-daemon.service b/tools/packer/systemd/lotus-daemon.service index a8a6c2f41..0c14a4ab0 100644 --- a/tools/packer/systemd/lotus-daemon.service +++ b/tools/packer/systemd/lotus-daemon.service @@ -1,12 +1,11 @@ [Unit] Description=Lotus Daemon After=network.target -After=lotus-init.service -Wants=lotus-init.service [Service] User=fc Group=fc +ExecStartPre=/usr/local/bin/lotus-init.sh ExecStart=/usr/local/bin/lotus daemon Environment=LOTUS_PATH=/var/lib/lotus Restart=always diff --git a/tools/packer/systemd/lotus-init.service b/tools/packer/systemd/lotus-init.service deleted file mode 100644 index 5a9cb12db..000000000 --- a/tools/packer/systemd/lotus-init.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Type=oneshot -Description=Sync Lotus chain for the first time - -[Service] -User=fc -Group=fc -ExecStart=/usr/local/bin/lotus-init.sh -Environment=LOTUS_PATH=/var/lib/lotus -RemainAfterExit=yes - -[Install] -WantedBy=multi-user.target