Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- output_file="${USER}.json"
- # tamaƱo del directorio de usuario
- home_size=$(du -sh $HOME | cut -d ' ' -f 1 )
- api_server="192.168.88.6:8000"
- echo "{
- \"user\": \"$USER\",
- \"home\": \"$HOME\",
- \"home_size\": \"$home_size\"
- }" > "$output_file"
- curl -X POST http://${api_server}/report \
- -H "Content-Type: application/json" \
- -d @"$output_file"
Advertisement
Add Comment
Please, Sign In to add comment