21 lines
367 B
Bash
Executable File
21 lines
367 B
Bash
Executable File
#!/bin/bash
|
|
|
|
date=$(date '+%d-%m-%y à %H:%M')
|
|
echo "############################"
|
|
echo "$date"
|
|
|
|
/usr/bin/duniter stop
|
|
|
|
PID=$(ps auxf | grep "duniter" | grep -v -E "color=auto|grep|restart" | awk '{ print $2 }')
|
|
PID=($(echo "$PID" | tr '\n' ' '))
|
|
|
|
if [[ ! -z $PID ]]; then
|
|
echo "Kill PID ${PID[@]}"
|
|
kill -9 "${PID[@]}"
|
|
fi
|
|
sleep 1
|
|
/usr/bin/duniter webstart
|
|
|
|
|
|
exit 0
|