From 76630a7ff9be3164f6e5153125a1a2be2056d921 Mon Sep 17 00:00:00 2001 From: Foster Hangdaan Date: Mon, 4 Dec 2023 08:36:58 -0500 Subject: [PATCH] Add extension to script filename --- blog/posts/2023-12-02_make-your-own-ddns/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blog/posts/2023-12-02_make-your-own-ddns/index.md b/blog/posts/2023-12-02_make-your-own-ddns/index.md index c92be7c..c28090b 100644 --- a/blog/posts/2023-12-02_make-your-own-ddns/index.md +++ b/blog/posts/2023-12-02_make-your-own-ddns/index.md @@ -123,7 +123,7 @@ ## The Script Here is the content of the script: ``` ts -#!/usr/bin/env -S deno run --ext=ts --allow-net +#!/usr/bin/env -S deno run --allow-net /** * Copyright (c) 2023 Foster Hangdaan @@ -194,7 +194,7 @@ ## The Script ## 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 `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: ``` sh -sudo chown root:root /etc/cron.hourly/ddns -sudo chmod 700 /etc/cron.hourly/ddns +sudo chown root:root /etc/cron.hourly/ddns.ts +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.