<p>The other error Im getting is <code>dirname: command not found</code>.</p>
<p>I was able to solve this issue by just manually setting the DIR variable in the script I needed to use. There is probably a better way....</p>

CC BY-SA 4.0
2021-05-21T18:55:30.497Z
2021-05-21T18:55:30.497Z
Document Services
<p>I'm having trouble setting the variables of the env.sh file for craft-sctipts.</p>
<p>I getting an error: <code>File /common/defaults.sh is missing, aborting.</code> when I try to clear the cache using a cronjob pointing to the clear cache script.</p>
<p>My variables are set in the env.sh file, which is in the scripts directory.
<code>LOCAL_ROOT_PATH=&quot;/domains/mydomain.ca/&quot;</code>
<code>REMOTE_ROOT_PATH=&quot;/domains/mydomain.ca/&quot;</code></p>
<p>The scripts are in <code>/domains/mydomain.ca/scripts/</code> directory.</p>
<p>Any thoughts?</p>

CC BY-SA 4.0
2021-05-15T14:44:21.277Z
Those root paths aren't relative to your project root, they are meant to be absolute system paths - are the `/domains` folders at the root of your system?
michaelroper
CC BY-SA 4.0
2021-05-21T18:13:09.450Z
Yah... /domains is the top level directory (Shared Media Temple hosting).
Document Services
<cache>
.env.sh in craft-scrips
# .env.sh in craft-scrips

(Asked by: username_0 on 2021-05-14)

I'm having trouble setting the variables of the env.sh file for craft-sctipts.

I getting an error: `File /common/defaults.sh is missing, aborting.` when I try to clear the cache using a cronjob pointing to the clear cache script.

My variables are set in the env.sh file, which is in the scripts directory.
`LOCAL_ROOT_PATH="/domains/mydomain.ca/"`
`REMOTE_ROOT_PATH="/domains/mydomain.ca/"`

The scripts are in `/domains/mydomain.ca/scripts/` directory.

Any thoughts?

**Tags:** cache
> **Comments:**
> **username_1**: Those root paths aren't relative to your project root, they are meant to be absolute system paths - are the `/domains` folders at the root of your system?  
> **username_0**: Yah... /domains is the top level directory (Shared Media Temple hosting).  

---

## 1 answers

### Answer by username_0 on 2021-05-21. Score: 1

The other error Im getting is `dirname: command not found`.

I was able to solve this issue by just manually setting the DIR variable in the script I needed to use. There is probably a better way....


---

