wagon/back/lib/ssl/peer/del

10 lines
319 B
Plaintext
Raw Normal View History

2022-08-29 01:04:37 -06:00
#!/bin/bash
# FILE: wgapi:back/lib/ssl/peer/del
# DESCRIPTION: Delete SSL cert for a removed device
# USAGE: del hostname username
2022-08-29 01:04:37 -06:00
[ "$#" == "2" ] || exit
#TODO Check for root
rm -rf "${SSL_CONFIG_DIR}/${username}/${hostname}/" 2>/dev/null
rm -rf "${SSL_CONFIG_DIR}/${username}/${hostname}.*" 2>/dev/null