use pre exec
This commit is contained in:
parent
6b9478f862
commit
fca183161a
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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