-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from egfanboy/fix-download
Fix download
- Loading branch information
Showing
8 changed files
with
56 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
echo "Deleting dist directory" | ||
rm -rf $PWD/dist | ||
echo "Building service" | ||
go build -o $PWD/dist/mediapire-media-host cmd/main.go |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
MEDIA_HOST_CONFIG_PATH= | ||
MEDIA_HOST_LOG_PATH= |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
source ./bin/env.sh | ||
if [ -z "$MEDIA_HOST_LOG_PATH" ]; | ||
then | ||
echo "MEDIA_HOST_LOG_PATH not defined, please add it to the bin/env.sh file and retry again." | ||
exit 1 | ||
fi | ||
|
||
tail -f -n 1000 $MEDIA_HOST_LOG_PATH/logs.txt |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
source $PWD/bin/env.sh | ||
|
||
if [ -z "$MEDIA_HOST_CONFIG_PATH" ]; | ||
then | ||
echo "MEDIA_HOST_CONFIG_PATH not defined, please add it to the bin/env.sh file and retry again." | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$MEDIA_HOST_LOG_PATH" ]; | ||
then | ||
echo "MEDIA_HOST_LOG_PATH not defined, please add it to the bin/env.sh file and retry again." | ||
exit 1 | ||
fi | ||
|
||
$PWD/bin/build.sh | ||
echo "Starting service" | ||
nohup $PWD/dist/mediapire-media-host --config $MEDIA_HOST_CONFIG_PATH &> $MEDIA_HOST_LOG_PATH/logs.txt & | ||
echo "Service started with PID $!" | ||
echo $! > $PWD/bin/.pid |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
PID_FILE=$PWD/bin/.pid | ||
PID=$(cat $PID_FILE) | ||
|
||
if kill $PID; then | ||
echo "Mediapire media host successfully stopped" | ||
rm $PID_FILE | ||
fi |
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
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
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