OPiMedia

spotify.sh

Jun 6th, 2018
13,032
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2. # Runs Spotify, and after that blockify.
  3. # Redirects standard and error outputs to log file for both
  4. # June 7, 2018
  5.  
  6. BLOCKIFYDIR=~/.config/blockify/addlogs
  7.  
  8. BLOCKIFYLOG=$BLOCKIFYDIR/blockify.log
  9. SPOTIFYLOG=$BLOCKIFYDIR/spotify.log
  10.  
  11. DATE=`date`
  12. HEADER="\n==============================\n$DATE"
  13.  
  14. mkdir -p $BLOCKIFYDIR
  15.  
  16. echo Run Spotify
  17. echo $HEADER >> $SPOTIFYLOG
  18. spotify 2>&1 >> $SPOTIFYLOG &
  19.  
  20. sleep 10
  21.  
  22. echo Run blockify
  23. echo $HEADER >> $BLOCKIFYLOG
  24. blockify 2>&1 >> $BLOCKIFYLOG &
RAW Paste Data