Last active
August 28, 2020 23:03
-
-
Save PieterScheffers/274b8e46220d28bf77e8cf76bfd0f53e to your computer and use it in GitHub Desktop.
TransIP Stack - Clear Trash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
STACK_URL=myuser.stackstorage.com | |
STACK_USER=myuser | |
STACK_PASSWORD=nooneknowsthis | |
curl \ | |
--silent \ | |
-X POST \ | |
-H "Content-Type: application/json" \ | |
-H "Accept: application/json" \ | |
-d '[{"action":"delete","all":true,"path":"/","query":""}]' \ | |
-u "${STACK_USER}:${STACK_PASSWORD}" \ | |
https://$STACK_URL/api/trashbin | |
Helaas geen webDAV token, maar je account password hoort hier in de variabele STACK_PASSWORD. Dit zorgt er ook indirect voor dat je voor dit account geen 2nd factor kan gebruiken, dus het is aan te raden een separaat account hiervoor te maken.
/EDIT: separate stack-user*
Ja dat klopt. Maar dit is niet je TransIP account wachtwoord, maar het wachtwoord van een Stack account.
Thanks, hier was ik naar op zoek!
Thank you, mooie toevoeging aan mijn backup script 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Links