Advertisement
Guest User

Untitled

a guest
Feb 19th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/bash
  2. echo "This will remove all files of your bot-installation"
  3. read -p "Are you sure you want to continue? (y/n)" -r
  4. if [[ $REPLY =~ ^[Yy]$ || $REPLY =~ ^[Yy][Ee][Ss]$ ]]; then
  5. SERVICE_FILE="/lib/systemd/system/triplea-bot@.service"
  6. if [[ -f "$SERVICE_FILE" ]]; then
  7. sudo service 'triplea-bot@*' stop
  8. sudo systemctl disable triplea-bot@
  9. sudo rm $SERVICE_FILE
  10. fi
  11. rm $0
  12. DIR=$(dirname $0)
  13. if [[ $DIR -ef $PWD ]]; then
  14. DIR=$PWD
  15. cd ..
  16. fi
  17. rm -r $DIR
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement