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
Branches
No related tags found
No related merge requests found
...@@ -29,8 +29,6 @@ bind f eval "hardstatus ignore" ...@@ -29,8 +29,6 @@ bind f eval "hardstatus ignore"
bind F eval "hardstatus alwayslastline" bind F eval "hardstatus alwayslastline"
# Windows at startup # Windows at startup
screen -t "tvp_back" 0 bash -c 'cd /home/hermod/tv_panel && yarn start:prod' screen -t "tvp_chromium" 0 bash -c 'DISPLAY=:0 xdotool mousemove 10000 10000 && chromium-browser --kiosk --incognito --disable-gpu http://localhost:5000'
screen -t "tvp_front" 1 bash -c 'cd /home/hermod/tv_panel && yarn start:front' screen -t bash 1 bash
screen -t "tvp_chromium" 2 bash -c 'cd /home/hermod/tv_panel && DISPLAY=:0 ./front/start.sh' select 1
screen -t bash 3 bash
select 3
#!/bin/bash #!/bin/bash
if [ $NODE_ENV = "production" ] if [[ "$NODE_ENV" != "production" ]]
then 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 # Pull code
echo "Fetching the code..."
git fetch git fetch
# git reset --hard origin/master # git reset --hard origin/master
# Install deps # Install deps
echo "Installing dependencies..."
yarn install --pure-lockfile yarn install --pure-lockfile
# Build front # Build front
echo "Building front-end..."
yarn build:front yarn build:front
# Restart server # Restart server
# pm2 startOrRestart ./scripts/ecosystem.config.json echo "Restarting the back-end server..."
pm2 startOrRestart ./scripts/ecosystem.config.json
# Restart screen # Restart screen
# screen -S TVPanelScreen -X quit echo "Restarting the screen..."
# ./scripts/start_tv_panel.sh screen -S TVPanelScreen -X quit
fi ./scripts/start_tv_panel.sh
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment