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
|
2022-08-29 11:42:13 -06:00
|
|
|
# USAGE: del hostname username
|
2022-08-29 01:04:37 -06:00
|
|
|
|
2022-08-29 11:42:13 -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
|