Add extension to script filename
This commit is contained in:
parent
a18101eaba
commit
76630a7ff9
1 changed files with 4 additions and 4 deletions
|
@ -123,7 +123,7 @@ ## The Script
|
||||||
Here is the content of the script:
|
Here is the content of the script:
|
||||||
|
|
||||||
``` ts
|
``` ts
|
||||||
#!/usr/bin/env -S deno run --ext=ts --allow-net
|
#!/usr/bin/env -S deno run --allow-net
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Copyright (c) 2023 Foster Hangdaan <https://www.fosterhangdaan.com>
|
* Copyright (c) 2023 Foster Hangdaan <https://www.fosterhangdaan.com>
|
||||||
|
@ -194,7 +194,7 @@ ## The Script
|
||||||
|
|
||||||
## Schedule the Script to Run Every Hour with Cron
|
## Schedule the Script to Run Every Hour with Cron
|
||||||
|
|
||||||
On the Host Computer, save [the script](#the-script) as a file at `/etc/cron.hourly/ddns`. Make sure to replace some necessary values:
|
On the Host Computer, save [the script](#the-script) as a file at `/etc/cron.hourly/ddns.ts`. Make sure to replace some necessary values:
|
||||||
|
|
||||||
- Replace `example.com` in `const domain = "example.com";` with your domain.
|
- Replace `example.com` in `const domain = "example.com";` with your domain.
|
||||||
- Replace `key` in `const GODADDY_API_KEY = "key";` with your GoDaddy API key.
|
- Replace `key` in `const GODADDY_API_KEY = "key";` with your GoDaddy API key.
|
||||||
|
@ -203,8 +203,8 @@ ## Schedule the Script to Run Every Hour with Cron
|
||||||
Grant read, write, and execute permissions only to the `root` user:
|
Grant read, write, and execute permissions only to the `root` user:
|
||||||
|
|
||||||
``` sh
|
``` sh
|
||||||
sudo chown root:root /etc/cron.hourly/ddns
|
sudo chown root:root /etc/cron.hourly/ddns.ts
|
||||||
sudo chmod 700 /etc/cron.hourly/ddns
|
sudo chmod 700 /etc/cron.hourly/ddns.ts
|
||||||
```
|
```
|
||||||
|
|
||||||
> Access to the script should be granted only to authorized users (such as `root`) since the script contains sensitive information: your GoDaddy API secret and key.
|
> Access to the script should be granted only to authorized users (such as `root`) since the script contains sensitive information: your GoDaddy API secret and key.
|
||||||
|
|
Loading…
Reference in a new issue