CLI with several instances of the same app

Dumb question time !

I have two instances of the same app : borg and borg__2

To manage borg via CLI i juste avec to use $ borg whatever command line -option
When i try to manage borg__2 by using $ borg__2 whatever command line -option i just get -bash: borg__2: command not found

What is the valid way to to use CLI with borg__2 in this case ?

I don’t have borg but there is a shell command in yunohost. sudo yunohost app shell <your_app_id>. So I think using the corresponding id may work. Try it and give us feedback

1 Like

I guess it could work, but it returns :

+ echo '! Helper used in legacy mode !'
+ set +x
+ [[ ! /bin/bash =~ /?bash$ ]]
++ yunohost app list --output-as json --quiet
++ jq -r '.apps[].id'
+ installed_apps_list=('aeneria' 'bazarr' 'borg' 'borg__2' 'flarum' 'grav' 'ihatemoney' 'jellyfin' 'jellyseerr' 'lidarr' 'netdata' 'nextcloud' 'onlyoffice' 'pairdrop' 'prowlarr' 'radarr' 'roundcube' 'sonarr' 'synapse' 'transmission' 'vaultwarden')
+ local installed_apps_list
+ [[  aeneria bazarr borg borg__2 flarum grav ihatemoney jellyfin jellyseerr lidarr netdata nextcloud onlyoffice pairdrop prowlarr radarr roundcube sonarr synapse transmission vaultwarden  != *\ \b\o\r\g\_\_\2\ * ]]
+ id -u borg__2
++ ynh_app_setting_get --app=borg__2 --key=install_dir
++ local _globalapp=borg__2
++ local legacy_args=ak
++ args_array=(['a']='app=' ['k']='key=')
++ local -A args_array
++ local app
++ local key
++ ynh_handle_getopts_args --app=borg__2 --key=install_dir
++ set +o xtrace
++ app=borg__2
++ [[ install_dir =~ (unprotected|protected|skipped)_ ]]
++ ynh_app_setting get borg__2 install_dir
++ set +o xtrace
+ local install_dir=
+ '[' -z '' ']'
+ ynh_print_err '--message=borg__2 has no install_dir setting (does it use packaging format >=2?)'
+ local legacy_args=m
+ args_array=(['m']='message=')
+ local -A args_array
+ local message
+ ynh_handle_getopts_args '--message=borg__2 has no install_dir setting (does it use packaging format >=2?)'
+ set +o xtrace
+ ynh_print_log '[Error] borg__2 has no install_dir setting (does it use packaging format >=2?)'
+ echo -e '[Error] borg__2 has no install_dir setting (does it use packaging format >=2?)'
[Error] borg__2 has no install_dir setting (does it use packaging format >=2?)
+ exit 1

borg haven’t switched to packaging v2 yet so yunohost app shell route is a no-go for now :confused: