mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-05 00:20:08 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user