-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reuse code of stop.sh in start.sh. Add Progress report and error hand…
…ling if no arguments provided to start.sh
- Loading branch information
1 parent
b2be2c0
commit d8affcf
Showing
2 changed files
with
19 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
#!/bin/sh | ||
export LD_LIBRARY_PATH=/usr/local/lib | ||
#!/bin/bash | ||
|
||
killall browser-main-daemon >> /dev/null 2>&1 | ||
killall browser-wsaudio >> /dev/null 2>&1 | ||
killall browser-wsconfig >> /dev/null 2>&1 | ||
if [ "${#}" -eq 0 ]; then | ||
echo 'Error: ${1} must be the name of a log file.' 2>&1 | ||
exit 1 | ||
fi | ||
|
||
nohup ./browser-main-daemon >> $1 2>&1 & | ||
sleep 4 | ||
nohup ./browser-wsaudio >> $1 2>&1 & | ||
nohup ./browser-wsconfig >> $1 2>&1 & | ||
sleep 2 | ||
log_file="${1}" | ||
|
||
echo "Daemons started!" | ||
./stop.sh > /dev/null | ||
|
||
echo -n 'Starting daemons ' | ||
nohup ./browser-main-daemon >> "${log_file}" 2>&1 & | ||
sleep 4; echo -n '.' | ||
nohup ./browser-wsaudio >> "${log_file}" 2>&1 & | ||
sleep 1; echo -n '.' | ||
nohup ./browser-wsconfig >> "${log_file}" 2>&1 & | ||
sleep 1; echo -n '.' | ||
echo " done" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/bash | ||
|
||
killall browser-wsconfig | ||
killall browser-wsaudio | ||
killall browser-main-daemon | ||
killall browser-main-daemon > /dev/null 2>&1 | ||
killall browser-wsaudio > /dev/null 2>&1 | ||
killall browser-wsconfig > /dev/null 2>&1 | ||
|
||
echo "Daemons stopped" |