Stop ipfs daemon on exit from mesh, if needed
This commit is contained in:
parent
35db1c66ff
commit
b20804ddc6
|
@ -426,6 +426,12 @@ function mesh_batman {
|
|||
echo ' if [ "$tracker_proc" ]; then' >> $batman_script
|
||||
echo ' kill -9 $tracker_proc 2> /dev/null' >> $batman_script
|
||||
echo ' fi' >> $batman_script
|
||||
echo ' if [ ! -f /etc/systemd/system/ipfs.service ]; then' >> $batman_script
|
||||
echo ' ipfs_proc=$(ps aux | grep ipfs | grep -v grep | awk -F " " "{print $2}" | head -n1)' >> $batman_script
|
||||
echo ' if [ "$ipfs_proc" ]; then' >> $batman_script
|
||||
echo ' kill -9 $ipfs_proc 2> /dev/null' >> $batman_script
|
||||
echo ' fi' >> $batman_script
|
||||
echo ' fi' >> $batman_script
|
||||
echo '}' >> $batman_script
|
||||
echo '' >> $batman_script
|
||||
echo 'if ! grep -q "$IFACE" /proc/net/dev; then' >> $batman_script
|
||||
|
|
Loading…
Reference in New Issue