Remove internal chmod +x after update

According to the .NET 6.0 ZipFile changes, .NET can now preserve chmod +x after extracting archive, so this "workaround" should no longer be needed
This commit is contained in:
Archi
2021-11-11 18:41:52 +01:00
parent 0c8d77b3d9
commit 951d9dc99f
11 changed files with 3 additions and 20 deletions

View File

@@ -309,14 +309,6 @@ public static class ASF {
return null;
}
if (OperatingSystem.IsFreeBSD() || OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()) {
string executable = Path.Combine(SharedInfo.HomeDirectory, SharedInfo.AssemblyName);
if (File.Exists(executable)) {
OS.UnixSetFileAccess(executable, OS.EUnixPermission.Combined755);
}
}
ArchiLogger.LogGenericInfo(Strings.UpdateFinished);
return newVersion;

View File

@@ -308,7 +308,6 @@ internal static class OS {
UserExecute = 0x40,
UserWrite = 0x80,
UserRead = 0x100,
Combined755 = UserRead | UserWrite | UserExecute | GroupRead | GroupExecute | OtherRead | OtherExecute,
Combined777 = UserRead | UserWrite | UserExecute | GroupRead | GroupWrite | GroupExecute | OtherRead | OtherWrite | OtherExecute
}

View File

@@ -106,6 +106,5 @@ while :; do
fi
fi
chmod +x "$SCRIPT_PATH" # If ASF exited by itself, we need to ensure that our script is still set to +x after auto-update
sleep 1
done

View File

@@ -104,5 +104,3 @@ else
mono ${MONO_ARGS-} "$BINARY" $BINARY_ARGS
fi
fi
chmod +x "$SCRIPT_PATH" # If ASF exited by itself, we need to ensure that our script is still set to +x after auto-update

View File

@@ -5,7 +5,7 @@ WantedBy=multi-user.target
EnvironmentFile=-/etc/asf/%i
ExecStart=mono /home/%i/ArchiSteamFarm/ArchiSteamFarm.exe --no-restart --process-required --service --system-required
Restart=on-success
RestartSec=5s
RestartSec=1s
SyslogIdentifier=asf-%i
User=%i

View File

@@ -106,6 +106,5 @@ while :; do
fi
fi
chmod +x "$SCRIPT_PATH" # If ASF exited by itself, we need to ensure that our script is still set to +x after auto-update
sleep 1
done

View File

@@ -104,5 +104,3 @@ else
dotnet ${DOTNET_ARGS-} "$BINARY" $BINARY_ARGS
fi
fi
chmod +x "$SCRIPT_PATH" # If ASF exited by itself, we need to ensure that our script is still set to +x after auto-update

View File

@@ -5,7 +5,7 @@ WantedBy=multi-user.target
EnvironmentFile=-/etc/asf/%i
ExecStart=dotnet /home/%i/ArchiSteamFarm/ArchiSteamFarm.dll --no-restart --process-required --service --system-required
Restart=on-success
RestartSec=5s
RestartSec=1s
SyslogIdentifier=asf-%i
User=%i

View File

@@ -99,6 +99,5 @@ while :; do
fi
fi
chmod +x "$SCRIPT_PATH" # If ASF exited by itself, we need to ensure that our script is still set to +x after auto-update
sleep 1
done

View File

@@ -5,7 +5,7 @@ WantedBy=multi-user.target
EnvironmentFile=-/etc/asf/%i
ExecStart=/home/%i/ArchiSteamFarm/ArchiSteamFarm --no-restart --process-required --service --system-required
Restart=on-success
RestartSec=5s
RestartSec=1s
SyslogIdentifier=asf-%i
User=%i

View File

@@ -78,6 +78,5 @@ while :; do
"$BINARY" $BINARY_ARGS # Start ASF in the foreground, trap sadly won't work until process exit
fi
chmod +x "$SCRIPT_PATH" # If ASF exited by itself, we need to ensure that our script is still set to +x after auto-update
sleep 1
done