mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
restore permissions
This commit is contained in:
parent
6f4d45440a
commit
e54ae11c33
@ -49,13 +49,11 @@ function create_tmp() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ensure_runroot() {
|
function ensure_runroot() {
|
||||||
if [ ! -d "$cur" ]; then
|
kvmd-pstrun -- bash -c "
|
||||||
kvmd-pstrun -- bash -c "
|
set -ex
|
||||||
set -ex
|
mkdir -p '$cur'
|
||||||
mkdir -p '$cur'
|
chown -R '$user:' '$cur/..'
|
||||||
chown '$user:' '$cur'
|
"
|
||||||
"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function restart_if_running() {
|
function restart_if_running() {
|
||||||
@ -99,6 +97,7 @@ case "$1" in
|
|||||||
shift
|
shift
|
||||||
create_tmp
|
create_tmp
|
||||||
cp -a "$cur"/{config,work,logs} "$tmp"
|
cp -a "$cur"/{config,work,logs} "$tmp"
|
||||||
|
chown -R "$user:" "$tmp"
|
||||||
sed -s -i -e "s| = $cur/| = $tmp/|g" "$tmp/config/renewal/"*
|
sed -s -i -e "s| = $cur/| = $tmp/|g" "$tmp/config/renewal/"*
|
||||||
sudo -u "$user" certbot renew "$@" \
|
sudo -u "$user" certbot renew "$@" \
|
||||||
--config-dir="$tmp/config" \
|
--config-dir="$tmp/config" \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user