mirror of
https://github.com/billz/raspap-webgui.git
synced 2023-10-10 13:37:24 +02:00
Move old install directory if it exists
This commit is contained in:
parent
3a958e3f3b
commit
b8b3fd1d31
@ -64,9 +64,10 @@ function enable_php_lighttpd() {
|
||||
# Verifies existence and permissions of RaspAP directory
|
||||
function create_raspap_directories() {
|
||||
install_log "Creating RaspAP directories"
|
||||
if [ ! -d "$raspap_dir" ]; then
|
||||
sudo mkdir -p "$raspap_dir" || install_error "Unable to create directory '$raspap_dir'"
|
||||
if [ -d "$raspap_dir" ]; then
|
||||
sudo mv $raspap_dir $raspap_dir.original || install_error "Unable to move old directory out of the way"
|
||||
fi
|
||||
sudo mkdir -p "$raspap_dir" || install_error "Unable to create directory '$raspap_dir'"
|
||||
|
||||
sudo chown -R $raspap_user:$raspap_user "$raspap_dir" || install_error "Unable to change file ownership for '$raspap_dir'"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user