# DietPi installation lacks basic commands

**URL:** <https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388>\
**Category:** General\
**Created:** [20 April 2019 18:41 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388 "2019-04-20T18:41:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bwims](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bwims/32/64907_2.png) [@bwims](https://discourse.nodered.org/u/bwims)\
**Post date:** [20 April 2019 18:41 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/1 "2019-04-20T18:41:52Z")

</div>

Hi,

I am just getting into Node-RED. All the documentation I find discusses the 3 commands:

Node-red-start  
Node-red-stop  
Node-red-log

But the DietPi installation of Node-RED only provides the command Node-red

Incidentally, I am also running on an Pine64, if that makes a difference.

Has anybody any ideas why this should be so?

Thanks!

Brian

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 April 2019 18:50 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/2 "2019-04-20T18:50:17Z")

</div>

the default DietPi install does not install those extra commands, so they are not available.

If you use our upgrade script for Pi - it should fail to upgrade and tell you to use their update mechanism, but it will as a bonus add the commands for you... Alternatively the commands used to generate them can be run manually

```auto
    echo "journalctl -f -n 25 -u node-red -o cat" > /usr/bin/node-red-log
    chmod +x /usr/bin/node-red-log
    echo "dietpi-services stop node-red" > /usr/bin/node-red-stop
    chmod +x /usr/bin/node-red-stop
    echo "dietpi-services start node-red" > /usr/bin/node-red-start
    echo "journalctl -f -n 0 -u node-red -o cat" >> /usr/bin/node-red-start
    chmod +x /usr/bin/node-red-start

```

Note: they are not 100% identical in that they are are calling the dietpi-services command but hopefully are close enough.

---

<div class="post-metadata">

**Author:** ![hkayan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hkayan/32/42713_2.png) [@hkayan](https://discourse.nodered.org/u/hkayan)\
**Post date:** [19 October 2021 11:50 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/3 "2021-10-19T11:50:37Z")

</div>

@dceejay

The weird thing is even though, I can see `node-red-stop` and `node-red-start` at `/usr/bin`, still getting the following error:  
`/usr/bin/node-red-stop: line 1: dietpi-services: command not found`  
If I run as root:  
`/usr/bin/node-red-stop: 1: dietpi-services: not found`

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 October 2021 12:40 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/4 "2021-10-19T12:40:55Z")

</div>

That is saying that a command used inside node-red-stop is not found. Not that node-red-stop itself is not found. Have a look at the start of the node-red-stop script.

---

<div class="post-metadata">

**Author:** ![hkayan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hkayan/32/42713_2.png) [@hkayan](https://discourse.nodered.org/u/hkayan)\
**Post date:** [19 October 2021 12:45 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/5 "2021-10-19T12:45:07Z")

</div>

Yes, I am aware of that, that is why I found it weird.

Inside of `node-red-stop`, there is `dietpi-services stop node-red` as expected from @dceejay answer.

`dietpi-services stop node-red` runs pretty fine, if I run it via terminal.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 October 2021 13:02 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/6 "2021-10-19T13:02:24Z")

</div>

> [@hkayan](#):
>
> dietpi-services: command not found

Strange. Does it help if you use the full path to dietpi-services in the script. So possibly  
`/usr/bin/dietpi-services stop node-red`  
You can find where it is by using `which dietpi-services`

---

<div class="post-metadata">

**Author:** ![hkayan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hkayan/32/42713_2.png) [@hkayan](https://discourse.nodered.org/u/hkayan)\
**Post date:** [19 October 2021 13:12 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/7 "2021-10-19T13:12:46Z")

</div>

`/usr/bin/dietpi-services` does not exit. `which dietpi-services` returns nothing.

However, I have seen the following when I have checked their [forum.](https://dietpi.com/phpbb/viewtopic.php?t=5315):

> In general dietpi-services is just a frontend for systemctl that we use to start/stop/restart all known/added services on boot, before and after software installs, updates and such, in an order that respects cross-access, e.g. webserver accessing PHP-FPM, or PHP accessing database via module and such.

Hence, I changed the `dietpi-services` to `systemctl`. Now, it works as expected.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [19 October 2021 13:37 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/8 "2021-10-19T13:37:28Z")

</div>

> [@hkayan](#):
>
> `which dietpi-services` returns nothing.

It must be just an alias rather than a script, which would explain why it could not be found in by the script.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 October 2021 14:55 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/9 "2021-10-19T14:55:19Z")

</div>

Thanks for digging into this - just to confirm - you changed the script to be `systemctl stop node-red` and that now works ?

---

<div class="post-metadata">

**Author:** ![hkayan](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hkayan/32/42713_2.png) [@hkayan](https://discourse.nodered.org/u/hkayan)\
**Post date:** [19 October 2021 14:58 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/10 "2021-10-19T14:58:12Z")

</div>

Hi @dceejay,

Yes, exactly.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [19 October 2021 16:50 UTC](https://discourse.nodered.org/t/dietpi-installation-lacks-basic-commands/10388/11 "2021-10-19T16:50:58Z")

</div>

Thanks. I’ll update the script to set it like that instead
