mirror of
https://github.com/unraid/api.git
synced 2026-01-06 00:30:22 -06:00
build: fix doinst.sh compatibility with installpkg --root (#1446)
- Isolate plugin concerns into `.plg` plugin & api file modifiers instead of the api's slackware package. ## Summary by CodeRabbit * **New Features** * Installation process modularized into package installation, post-install setup with verification, and service startup with cleanup. * Added logging and error detection during installation, including symlink verification. * Created required log directory to support service dependencies. * Integrated nginx service with reload capability triggered by configuration changes. * Added automatic patching of nginx configuration and hosts file to improve security and iframe compatibility. * Enhanced file modification system to handle side effects and trigger nginx reloads as needed. * **Refactor** * Restructured installation scripts for clarity; setup scripts now separate steps. * Removed legacy installation logic and deprecated related scripts. * Enabled hard link addition during package creation. * Simplified installation scripts by removing conditional branching and detailed logging. * Streamlined API environment setup by removing redundant post-install steps. * Updated dependency injection to explicitly provide nginx service token. * Improved patch application error reporting with file path details. * **Chores** * Disabled legacy scripts to streamline installation. * Removed `.gitignore` to track previously ignored files. * Updated tests to include new dependencies and relaxed logger assertions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- - To see the specific tasks where the Asana app for GitHub is being used, see below: - https://app.asana.com/0/0/1210661184127051
This commit is contained in:
7
packages/unraid-shared/src/services/nginx.ts
Normal file
7
packages/unraid-shared/src/services/nginx.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export interface NginxService {
|
||||
/**
|
||||
* Reloads nginx via its rc script
|
||||
* @returns true if the reload was successful, false otherwise
|
||||
*/
|
||||
reload(): Promise<boolean>;
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
export const UPNP_CLIENT_TOKEN = 'UPNP_CLIENT';
|
||||
export const API_KEY_SERVICE_TOKEN = 'ApiKeyService';
|
||||
export const LIFECYCLE_SERVICE_TOKEN = 'LifecycleService';
|
||||
export const NGINX_SERVICE_TOKEN = 'NginxService';
|
||||
|
||||
Reference in New Issue
Block a user