Browse Source

Fix stop script, add default var expansion for root-folder

Nicolas Meienberger 3 years ago
parent
commit
6b1522babb
2 changed files with 3 additions and 2 deletions
  1. 1 1
      packages/system-api/src/modules/system/system.controller.ts
  2. 2 1
      scripts/app.sh

+ 1 - 1
packages/system-api/src/modules/system/system.controller.ts

@@ -65,7 +65,7 @@ const getMemoryInfo = async (req: Request, res: Response<MemoryData>) => {
   res.status(200).json(result);
 };
 
-const getVersion = async (_: Request, res: Response<{ current: string; latest: string }>) => {
+const getVersion = async (req: Request, res: Response<{ current: string; latest: string }>) => {
   let version = TipiCache.get<string>('latestVersion');
 
   if (!version) {

+ 2 - 1
scripts/app.sh

@@ -60,7 +60,8 @@ if [ -z ${2+x} ]; then
   exit 1
 else
   app="$2"
-  root_folder_host="$3"
+  root_folder_host="${3:-$ROOT_FOLDER}"
+
   app_dir="${ROOT_FOLDER}/apps/${app}"
   app_data_dir="${ROOT_FOLDER}/app-data/${app}"