Restore gogs config
This commit is contained in:
parent
11e6257545
commit
9085239218
|
@ -266,14 +266,10 @@ function restore_local_gogs {
|
|||
temp_restore_dir=/root/tempgogs
|
||||
if [ -d ${USB_MOUNT}/backup/gogs ]; then
|
||||
echo $"Restoring Gogs settings"
|
||||
if [ ! -d /home/${GOGS_USERNAME}/custom ]; then
|
||||
mkdir -p /home/${GOGS_USERNAME}/custom
|
||||
fi
|
||||
if [ ! -d ${temp_restore_dir}/home/${GOGS_USERNAME}/custom ]; then
|
||||
cp -r ${temp_restore_dir}/home/${GOGS_USERNAME}/custom/* /home/${GOGS_USERNAME}/custom
|
||||
else
|
||||
cp -r ${temp_restore_dir}/* /home/${GOGS_USERNAME}/custom/
|
||||
if [ ! -d /home/${GOGS_USERNAME}/custom/conf ]; then
|
||||
mkdir -p /home/${GOGS_USERNAME}/custom/conf
|
||||
fi
|
||||
cp -r ${temp_restore_dir}/conf/* /home/${GOGS_USERNAME}/custom/conf/
|
||||
if [ ! "$?" = "0" ]; then
|
||||
function_check set_user_permissions
|
||||
set_user_permissions
|
||||
|
|
Loading…
Reference in New Issue