Reset ACLs on the config directory and migrated config files
This commit is contained in:
@@ -6,21 +6,25 @@ for %%I in ("%~dp0\..") do set "OLD_DIR=%%~fI"
|
|||||||
rem Create the config directory if it didn't already exist
|
rem Create the config directory if it didn't already exist
|
||||||
set "NEW_DIR=%OLD_DIR%\config"
|
set "NEW_DIR=%OLD_DIR%\config"
|
||||||
if not exist "%NEW_DIR%\" mkdir "%NEW_DIR%"
|
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
|
rem Migrate all files that aren't already present in the config dir
|
||||||
if exist "%OLD_DIR%\apps.json" (
|
if exist "%OLD_DIR%\apps.json" (
|
||||||
if not exist "%NEW_DIR%\apps.json" (
|
if not exist "%NEW_DIR%\apps.json" (
|
||||||
move "%OLD_DIR%\apps.json" "%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 exist "%OLD_DIR%\sunshine.conf" (
|
||||||
if not exist "%NEW_DIR%\sunshine.conf" (
|
if not exist "%NEW_DIR%\sunshine.conf" (
|
||||||
move "%OLD_DIR%\sunshine.conf" "%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 exist "%OLD_DIR%\sunshine_state.json" (
|
||||||
if not exist "%NEW_DIR%\sunshine_state.json" (
|
if not exist "%NEW_DIR%\sunshine_state.json" (
|
||||||
move "%OLD_DIR%\sunshine_state.json" "%NEW_DIR%\sunshine_state.json"
|
move "%OLD_DIR%\sunshine_state.json" "%NEW_DIR%\sunshine_state.json"
|
||||||
|
icacls "%NEW_DIR%\sunshine_state.json" /reset
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user