Initial commit (I feel unsafe)
This commit is contained in:
15
foundry_server-teardown
Normal file
15
foundry_server-teardown
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
username=foundry_server
|
||||
|
||||
# application
|
||||
sudo machinectl shell ${username}@ /bin/bash -c "systemctl --user disable --now ${username}-start.service ; systemctl --user daemon-reload"
|
||||
sudo machinectl shell ${username}@ /bin/bash -c ". ~/.nvm/nvm.sh ; nvm deactivate ; nvm uninstall --lts"
|
||||
|
||||
uid_num=$(id -u $username)
|
||||
sudo killall -9 -v -g -u $username
|
||||
sudo crontab -r -u $username
|
||||
sudo deluser --remove-all-files $username
|
||||
|
||||
# clean-up
|
||||
sudo find / -user "$uid_num" -delete
|
||||
Reference in New Issue
Block a user