Skip to content

Commit

Permalink
Create run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
h8pewou authored Apr 17, 2021
1 parent c5d8f74 commit e962ed4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
# Legacy WebOS Youtube Service startup script

# Update config.php keys based on environmental variables
if [ $YOUTUBE_API_KEY ]; then sed -i "/api_key/c\\\t'api_key' => '$YOUTUBE_API_KEY'," /var/www/html/config.php; fi
if [ $YOUTUBE_CLIENT_KEY ]; then sed -i "/client_key/c\\\t'client_key' => '$YOUTUBE_CLIENT_KEY'," /var/www/html/config.php; fi
if [ $YOUTUBE_DEBUG_KEY ]; then sed -i "/debug_key/c\\\t'debug_key' => '$YOUTUBE_DEBUG_KEY'," /var/www/html/config.php; fi
if [ $YOUTUBE_SERVER_ID ]; then sed -i "/server_id/c\\\t'server_id' => '$YOUTUBE_SERVER_ID'" /var/www/html/config.php; fi

# Start Apache
rm -f /var/run/apache2/apache2.pid
apachectl -DFOREGROUND

0 comments on commit e962ed4

Please sign in to comment.