Skip to content
Snippets Groups Projects
Commit bd3c71dd authored by Aymeric Bernard's avatar Aymeric Bernard
Browse files

screen only starts chromium, that will query the back. Update script refactor

parent 1e57f377
No related branches found
No related tags found
No related merge requests found
......@@ -29,8 +29,6 @@ bind f eval "hardstatus ignore"
bind F eval "hardstatus alwayslastline"
# Windows at startup
screen -t "tvp_back" 0 bash -c 'cd /home/hermod/tv_panel && yarn start:prod'
screen -t "tvp_front" 1 bash -c 'cd /home/hermod/tv_panel && yarn start:front'
screen -t "tvp_chromium" 2 bash -c 'cd /home/hermod/tv_panel && DISPLAY=:0 ./front/start.sh'
screen -t bash 3 bash
select 3
screen -t "tvp_chromium" 0 bash -c 'DISPLAY=:0 xdotool mousemove 10000 10000 && chromium-browser --kiosk --incognito --disable-gpu http://localhost:5000'
screen -t bash 1 bash
select 1
#!/bin/bash
if [ $NODE_ENV = "production" ]
if [[ "$NODE_ENV" != "production" ]]
then
read -p "The env if not production, this script can remove uncommitted changes. Are you sure you want to continue? [y/N] " prompt
if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]
then
echo "Pursuing..."
else
echo "Aborted."
exit 1
fi
fi
# Pull code
echo "Fetching the code..."
git fetch
# git reset --hard origin/master
# Install deps
echo "Installing dependencies..."
yarn install --pure-lockfile
# Build front
echo "Building front-end..."
yarn build:front
# Restart server
# pm2 startOrRestart ./scripts/ecosystem.config.json
echo "Restarting the back-end server..."
pm2 startOrRestart ./scripts/ecosystem.config.json
# Restart screen
# screen -S TVPanelScreen -X quit
# ./scripts/start_tv_panel.sh
fi
\ No newline at end of file
echo "Restarting the screen..."
screen -S TVPanelScreen -X quit
./scripts/start_tv_panel.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment