# \[Freshrss\] YNH\_APP\_INSTANCE\_NAME in hook script

**URL:** https://forum.yunohost.org/t/freshrss-ynh-app-instance-name-in-hook-script/4541
**Category:** Apps packaging
**Tags:** english
**Created:** [March 18, 2018, 9:29am UTC](https://forum.yunohost.org/t/freshrss-ynh-app-instance-name-in-hook-script/4541 "2018-03-18T09:29:04Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![plopoyop](https://forum.yunohost.org/user_avatar/forum.yunohost.org/plopoyop/32/966_2.png) [@plopoyop](https://forum.yunohost.org/u/plopoyop)
#### Post date: [March 18, 2018, 9:29am UTC](https://forum.yunohost.org/t/freshrss-ynh-app-instance-name-in-hook-script/4541/1 "2018-03-18T09:29:05Z")

</div>

Hi,  
I have a problem with freshrss package.  
In post\_user\_create and post\_user\_delete hooks, I need YNH\_APP\_INSTANCE\_NAME in order to create/delete users into the right instance.  
But it looks like the variable is not provided. Am I doing something wrong or is it a bug ?

And something not related :  
freshrss app doen’t appear in the jenkins ci anymore, should I do something do get it back ?

Thanks.

---

<div class="post-metadata">

### Author: ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)
#### Post date: [March 18, 2018, 3:15pm UTC](https://forum.yunohost.org/t/freshrss-ynh-app-instance-name-in-hook-script/4541/2 "2018-03-18T15:15:00Z")

</div>

Hi

I don’t think hooks have the variable $YNH\_APP\_INSTANCE\_NAME, because hooks are not executed by apps, but by yunohost directly.  
But, if you need this variable, the better way si to set it in the hook script during the install of the app.

PS: [https://ci-apps.yunohost.org/jenkins/job/freshrss%20(Community)/](https://ci-apps.yunohost.org/jenkins/job/freshrss%20(Community)/)

---

<div class="post-metadata">

### Author: ![plopoyop](https://forum.yunohost.org/user_avatar/forum.yunohost.org/plopoyop/32/966_2.png) [@plopoyop](https://forum.yunohost.org/u/plopoyop)
#### Post date: [March 18, 2018, 4:25pm UTC](https://forum.yunohost.org/t/freshrss-ynh-app-instance-name-in-hook-script/4541/3 "2018-03-18T16:25:26Z")

</div>

Ok, I did it that way. Thanks a lot.

Thanks, I need to bookmark this one.  
I was going on [https://ci-apps-dev.yunohost.org/](https://ci-apps-dev.yunohost.org/)

---

<div class="post-metadata">

### Author: ![Maniack\_Crudelis](https://forum.yunohost.org/user_avatar/forum.yunohost.org/maniack_crudelis/32/13_2.png) [@Maniack\_Crudelis](https://forum.yunohost.org/u/Maniack_Crudelis)
#### Post date: [March 18, 2018, 4:51pm UTC](https://forum.yunohost.org/t/freshrss-ynh-app-instance-name-in-hook-script/4541/4 "2018-03-18T16:51:37Z")

</div>

> [@plopoyop](#):
>
> I was going on [https://ci-apps-dev.yunohost.org/](https://ci-apps-dev.yunohost.org/)

This other CI is for packagers who don’t (or don’t want to) use Package check on their own.  
On this CI, any packager can push his apps on a personal directory, and then the CI will add and check them.  
More informations [here](https://forum.yunohost.org/t/proposition-for-a-new-non-official-ci/3595).

---

<div class="post-metadata">

### Author: ![Gofannon](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/g/50afbb/32.png) [@Gofannon](https://forum.yunohost.org/u/Gofannon)
#### Post date: [October 18, 2018, 2:49pm UTC](https://forum.yunohost.org/t/freshrss-ynh-app-instance-name-in-hook-script/4541/5 "2018-10-18T14:49:13Z")

</div>

Hello @plopoyop,

I created an issue on the app repository and found this topic after… To keep a writing of it, here is a link to the issue : [https://github.com/YunoHost-Apps/freshrss\_ynh/issues/53](https://github.com/YunoHost-Apps/freshrss_ynh/issues/53)

---

<div class="post-metadata">

### Author: ![enuts](https://forum.yunohost.org/user_avatar/forum.yunohost.org/enuts/32/1795_2.png) [@enuts](https://forum.yunohost.org/u/enuts)
#### Post date: [January 10, 2020, 11:09am UTC](https://forum.yunohost.org/t/freshrss-ynh-app-instance-name-in-hook-script/4541/6 "2020-01-10T11:09:37Z")

</div>

Hi,

Is this solution still the best way to find App instance name in hook user create ?

By the way @plopoyop , it seems that you replace `APPNAMETOCHANGE` only in your upgrade script and not in the install script ?

---

<div class="post-metadata">

### Author: ![plopoyop](https://forum.yunohost.org/user_avatar/forum.yunohost.org/plopoyop/32/966_2.png) [@plopoyop](https://forum.yunohost.org/u/plopoyop)
#### Post date: [April 5, 2020, 3:40pm UTC](https://forum.yunohost.org/t/freshrss-ynh-app-instance-name-in-hook-script/4541/7 "2020-04-05T15:40:36Z")

</div>

Hi,  
I fixed that this week.  
You can upgrade on the testing branch.
