parent
00d9ec2f33
commit
10600ae4f1
@ -1,19 +1,19 @@
|
|||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param (
|
param (
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[string] $PathToTrashExe
|
[string] $PathToExe
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
if (Get-Command chmod -errorAction SilentlyContinue) {
|
if (Get-Command chmod -errorAction SilentlyContinue) {
|
||||||
"The chmod command was found. Setting read + execute permission."
|
"The chmod command was found. Setting read + execute permission."
|
||||||
& chmod +rx $PathToTrashExe
|
& chmod +rx $PathToExe
|
||||||
}
|
}
|
||||||
|
|
||||||
"Execute trash command to ensure basic functionality is working"
|
"Execute recyclarr command to ensure basic functionality is working"
|
||||||
& $PathToTrashExe -h
|
& $PathToExe -h
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
"Trash executable failed to run with exit code: $LASTEXITCODE"
|
"Recyclarr executable failed to run with exit code: $LASTEXITCODE"
|
||||||
exit -1
|
exit -1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in new issue