# Update & Upgrade Rule / Option for Vasic UI

**URL:** <https://community.openhab.org/t/update-upgrade-rule-option-for-vasic-ui/124594>\
**Category:** Beginners\
**Created:** [July 15, 2021, 11:07am UTC](https://community.openhab.org/t/update-upgrade-rule-option-for-vasic-ui/124594 "2021-07-15T11:07:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![milo](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@milo](https://community.openhab.org/u/milo)\
**Post date:** [July 15, 2021, 11:07am UTC](https://community.openhab.org/t/update-upgrade-rule-option-for-vasic-ui/124594/1 "2021-07-15T11:07:57Z")

</div>

Hello,

I implemented a update system rule but I always get this issue.

```yaml
2021-07-15 12:57:59.915 [INFO] [t.execute string_flag_System upgrade] - upgrading openHAB 

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.

    #2) Think before you type.

    #3) With great power comes great responsibility.

sudo: no tty present and no askpass program specified

```

here is my item:

```csv
String string_flag_System "System" <switch>

```

and my rule

```php
rule "execute string_flag_System upgrade"
when
    Item string_flag_System received command "Upgrade"
then
    try {
        logInfo("execute string_flag_System upgrade", "upgrading off openHAB")
        var ScriptResponse = executeCommandLine(Duration.ofSeconds(60), "sudo","apt-get update && apt-get upgrade")
        logInfo("execute string_flag_System upgrade", "upgrading openHAB " + ScriptResponse.toString() )
        //executeCommandLine("sudo","apt-get update")
        //executeCommandLine("sudo","apt-get upgrade")
        string_flag_System.postUpdate(NULL)
    }
    catch(Throwable T)
    {
        logError("Error", "Some bad stuff happened in \"execute string_flag_System upgrade\": " + T.toString)
    }
    finally
    {

    }
end

```

this is my visudo file

```php
openhab ALL=NOPASSWD: /usr/bin/apt-get upgrade, /usr/bin/apt-get update

```

Where is my error??

---

<div class="post-metadata">

**Author:** ![rlkoshak](https://community.openhab.org/user_avatar/community.openhab.org/rlkoshak/32/75251_2.png) [@rlkoshak](https://community.openhab.org/u/rlkoshak)\
**Post date:** [July 15, 2021, 1:05pm UTC](https://community.openhab.org/t/update-upgrade-rule-option-for-vasic-ui/124594/2 "2021-07-15T13:05:36Z")

</div>

> [@milo](#):
>
> Where is my error??

The first time you run sudo as a given user you are required to acknowledge that message telling you not to do bad stuff. So on the command line run sudo as the openhab user and press y to acknowledge the message and it won’t show up any more. Alternatively search Google and there may be a way to set a flag somewhere to suppress the message.

---

<div class="post-metadata">

**Author:** ![milo](https://community.openhab.org/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@milo](https://community.openhab.org/u/milo)\
**Post date:** [July 15, 2021, 1:21pm UTC](https://community.openhab.org/t/update-upgrade-rule-option-for-vasic-ui/124594/3 "2021-07-15T13:21:40Z")

</div>

> [@milo](#):
>
> `/usr/bin/apt-get upgrade`

I have done this via

```javascript
sudo -u openhab /bin/bash
and then sudo apt-get update && apt-ge upgrade

```

but there is not question coming up in the bash.

Regrads
