refactor(services): removed some comments that were no longer needed

This commit is contained in:
2025-04-18 16:25:00 -05:00
parent e780a24a8a
commit 2ffc3cc242

View File

@@ -2,8 +2,8 @@ param (
[string]$serviceName, [string]$serviceName,
[string]$option, [string]$option,
[string]$appPath, [string]$appPath,
[string]$command, # just the command like run startadm or what ever you have in npm. [string]$command, # just the command like run start or what ever you have in npm.
[string]$description [string]$description,
[string]$remote [string]$remote
) )
@@ -11,16 +11,6 @@ param (
# .\services.ps1 -serviceName "LSTV2" -option "install" -appPath "E:\LST\lstV2" -description "Logistics Support Tool V2" -command "run start" # .\services.ps1 -serviceName "LSTV2" -option "install" -appPath "E:\LST\lstV2" -description "Logistics Support Tool V2" -command "run start"
### the fix
# .\services.ps1 -serviceName "LST-App" -option "delete" -appPath "E:\LST\lstV2" -description "Logistics Support Tool V2" -command "run start"
# .\services.ps1 -serviceName "LST-frontend" -option "delete" -appPath "E:\LST\lstV2" -description "Logistics Support Tool V2" -command "run start"
# .\services.ps1 -serviceName "LST-System" -option "delete" -appPath "E:\LST\lstV2" -description "Logistics Support Tool V2" -command "run start"
# .\services.ps1 -serviceName "LST-Gateway" -option "delete" -appPath "E:\LST\lstV2" -description "Logistics Support Tool V2" -command "run start"
# .\services.ps1 -serviceName "LST-App" -option "install" -appPath "E:\LST\lst_backend" -description "Logistics Support Tool V2" -command "run startapp"
# .\services.ps1 -serviceName "LST-frontend" -option "install" -appPath "E:\LST\lst_backend" -description "Logistics Support Tool V2" -command "run startfront"
$nssmPath = $AppPath + "\nssm.exe" $nssmPath = $AppPath + "\nssm.exe"
$npmPath = "C:\Program Files\nodejs\npm.cmd" # Path to npm.cmd $npmPath = "C:\Program Files\nodejs\npm.cmd" # Path to npm.cmd
@@ -74,6 +64,30 @@ if ($option -eq "delete"){
} }
if ($option -eq "prodStop"){
if(-not $appPath){
Write-host "The path to the app is missing please add it in and try again."
exit 1
}
& $nssmPath stop $serviceName
write-host "Removing $($serviceName)"
#& $nssmPath remove $serviceName confirm
sc.exe config $serviceName start= disabled
}
if ($option -eq "prodStart"){
if(-not $appPath){
Write-host "The path to the app is missing please add it in and try again."
exit 1
}
& $nssmPath start $serviceName
write-host "Removing $($serviceName)"
#& $nssmPath remove $serviceName confirm
sc.exe config $serviceName start= auto
}
if($option -eq "install"){ if($option -eq "install"){
if(-not $appPath -or -not $description -or -not $command){ if(-not $appPath -or -not $description -or -not $command){
Write-host "Please check all parameters are passed to install the app.." Write-host "Please check all parameters are passed to install the app.."