I have /etc/systemd/system/tivalue.service
with following content:
[Unit]
Description=Ti-Value Node
After=network.target
[Service]
Type=simple
PIDFile=/var/run/tivalue.pid
User=root
Group=root
ExecStart=/root/TiValue/tiValue --rpcuser=admin --rpcpassword=123456 --httpdendpoint=127.0.0.1:8080 --daemon
KillSignal=15
Restart=always
[Install]
WantedBy=multi-user.target
and also /etc/systemd/system/tivalue.curl.sh
So, how can I execute /etc/systemd/system/tivalue.curl.sh
after successfully started tivalue.service
?
We can use systemd unit files to launch our script at boot. Unit files describe how the system should execute the given program. We set the user that the script will run with the User= option and the path to the script with the ExecStart= option. The various options are documented in the systemd.
Use an ExecStartPost= entry pointing at the script. See the ExecStartPre/ExecStartPost documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With