Reset ACLs on the config directory and migrated config files
This commit is contained in:
parent
65b7f2373c
commit
e8f3dfe32c
1 changed files with 4 additions and 0 deletions
|
|
@ -6,21 +6,25 @@ for %%I in ("%~dp0\..") do set "OLD_DIR=%%~fI"
|
|||
rem Create the config directory if it didn't already exist
|
||||
set "NEW_DIR=%OLD_DIR%\config"
|
||||
if not exist "%NEW_DIR%\" mkdir "%NEW_DIR%"
|
||||
icacls "%NEW_DIR%" /reset
|
||||
|
||||
rem Migrate all files that aren't already present in the config dir
|
||||
if exist "%OLD_DIR%\apps.json" (
|
||||
if not exist "%NEW_DIR%\apps.json" (
|
||||
move "%OLD_DIR%\apps.json" "%NEW_DIR%\apps.json"
|
||||
icacls "%NEW_DIR%\apps.json" /reset
|
||||
)
|
||||
)
|
||||
if exist "%OLD_DIR%\sunshine.conf" (
|
||||
if not exist "%NEW_DIR%\sunshine.conf" (
|
||||
move "%OLD_DIR%\sunshine.conf" "%NEW_DIR%\sunshine.conf"
|
||||
icacls "%NEW_DIR%\sunshine.conf" /reset
|
||||
)
|
||||
)
|
||||
if exist "%OLD_DIR%\sunshine_state.json" (
|
||||
if not exist "%NEW_DIR%\sunshine_state.json" (
|
||||
move "%OLD_DIR%\sunshine_state.json" "%NEW_DIR%\sunshine_state.json"
|
||||
icacls "%NEW_DIR%\sunshine_state.json" /reset
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue