diff --git a/SHELL/SEEDBOX/restart_rtorrent.sh b/SHELL/SEEDBOX/restart_rtorrent.sh new file mode 100644 index 0000000..ba35ec0 --- /dev/null +++ b/SHELL/SEEDBOX/restart_rtorrent.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +while getopts ":u:" opt; do + case "${opt}" in + u) user="${OPTARG}";; + esac +done + +# EXTRACTION DU PID DE RTORRENT DU USER +pid=$(ps -u $user -o pid,command | grep '[0-9] rtorrent$' | cut -d "r" -f1) + +kill -9 $pid +/root/rtorrent-check \ No newline at end of file