]> WPIA git - infra.git/blob - modules/hop/templates/commands.epp
upd: rename certificate renewal commands + add force mode
[infra.git] / modules / hop / templates / commands.epp
1 #!/bin/bash
2
3 com="$SSH_ORIGINAL_COMMAND"
4 if [[ "$com" == "update certs" || "$com" == "force update certs" ]]; then
5     exec ssh <%=$administrativeUser%>@10.0.3.1 "$com"
6 elif [[ "$com" == "reload certs" ]]; then
7     # requires sudo --> requires terminal
8     exec ssh -t <%=$administrativeUser%>@10.0.3.1 "reload certs"
9 elif [[ "$com" == "update crls" ]]; then
10     exec ssh  <%=$administrativeUser%>@10.0.3.1 "update crls"
11 else
12     echo $com
13 fi
14