Replace cp+chown with install
This commit is contained in:
parent
0461a8f0b8
commit
8cd801bd64
1 changed files with 2 additions and 4 deletions
|
@ -11,13 +11,11 @@ mosquitto_dir="/etc/mosquitto"
|
|||
|
||||
le_fullchain="$le_dir/fullchain.pem"
|
||||
mosquitto_fullchain="$mosquitto_dir/certs/fullchain.pem"
|
||||
cp "$le_fullchain" "$mosquitto_fullchain"
|
||||
chown mosquitto:root "$mosquitto_fullchain"
|
||||
install -m 644 -o mosquitto -g root "$le_fullchain" "$mosquitto_fullchain"
|
||||
|
||||
le_key="$le_dir/privkey.pem"
|
||||
mosquitto_key="$mosquitto_dir/certs/privkey.pem"
|
||||
cp "$le_key" "$mosquitto_key"
|
||||
chown mosquitto:root "$mosquitto_key"
|
||||
install -m 600 -o mosquitto -g root "$le_key" "$mosquitto_key"
|
||||
|
||||
# Tell mosquitto to reload certs
|
||||
pkill -x -HUP mosquitto
|
||||
|
|
Loading…
Add table
Reference in a new issue