use pre exec
This commit is contained in:
parent
6b9478f862
commit
fca183161a
@ -76,10 +76,6 @@ build {
|
|||||||
source = "./tools/packer/systemd/lotus-miner.service"
|
source = "./tools/packer/systemd/lotus-miner.service"
|
||||||
destination = "lotus-miner.service"
|
destination = "lotus-miner.service"
|
||||||
}
|
}
|
||||||
provisioner "file" {
|
|
||||||
source = "./tools/packer/systemd/lotus-init.service"
|
|
||||||
destination = "lotus-init.service"
|
|
||||||
}
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
source = "./tools/packer/homedir/LOTUS.txt"
|
source = "./tools/packer/homedir/LOTUS.txt"
|
||||||
destination = "LOTUS.txt"
|
destination = "LOTUS.txt"
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=Lotus Daemon
|
Description=Lotus Daemon
|
||||||
After=network.target
|
After=network.target
|
||||||
After=lotus-init.service
|
|
||||||
Wants=lotus-init.service
|
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=fc
|
User=fc
|
||||||
Group=fc
|
Group=fc
|
||||||
|
ExecStartPre=/usr/local/bin/lotus-init.sh
|
||||||
ExecStart=/usr/local/bin/lotus daemon
|
ExecStart=/usr/local/bin/lotus daemon
|
||||||
Environment=LOTUS_PATH=/var/lib/lotus
|
Environment=LOTUS_PATH=/var/lib/lotus
|
||||||
Restart=always
|
Restart=always
|
||||||
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user