-
-
Save gioxx/0c928f2a24d7bfba18f3cd0eb730c228 to your computer and use it in GitHub Desktop.
Un banale script sh per pilotare l'esecuzione (così come lo spegnimento / riavvio) di aMule AdunanzA installato su Synology.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
case "$1" in | |
start) | |
echo –n "Starting aMule ..." | |
/opt/bin/amuled -f | |
/opt/bin/amuleweb --admin-pass='PASSWORDCHEHAISCELTO' -q & | |
echo "Done." | |
;; | |
restartweb) | |
echo "Stopping aMule Web Interface ..." | |
PIDS=$(ps -eaf) | |
PID=$(echo "$PIDS" | grep "amuleweb" | awk '{print $2}') | |
kill -9 $PID | |
echo "aMule Web Interface Killed." | |
/opt/bin/amuleweb --admin-pass='PASSWORDCHEHAISCELTO' -q & | |
echo "aMule Web Interface Started." | |
;; | |
stop) | |
echo "Stopping aMule ..." | |
PIDS=$(ps -eaf) | |
PID=$(echo "$PIDS" | grep "amuled -f" | awk '{print $2}') | |
kill -9 $PID | |
echo "aMule Daemon Killed." | |
PID=$(echo "$PIDS" | grep "amuleweb" | awk '{print $2}') | |
kill -9 $PID | |
echo "aMule Web Interface Killed." | |
;; | |
restart) | |
echo –n "Stopping aMule ..." | |
PIDS=$(ps -eaf) | |
PID=$(echo "$PIDS" | grep "amuled -f" | awk '{print $2}') | |
kill -9 $PID | |
echo "aMule Daemon Killed." | |
PID=$(echo "$PIDS" | grep "amuleweb" | awk '{print $2}') | |
kill -9 $PID | |
echo "aMule Web Interface Killed." | |
echo "Starting aMule ..." | |
/opt/bin/amuled -f | |
/opt/bin/amuleweb --admin-pass='PASSWORDCHEHAISCELTO' -q & | |
echo "Done." | |
;; | |
*) | |
echo "Usage: aMuleStart start|stop|restart|restartweb" | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment