GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - KD5FMU/Staying-Connected: This is a script file installer that will help you stay connected to the node or nodes you designate

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
CONTRIBUTING
CONTRIBUTING
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
install-asl3-check-connection.sh
install-asl3-check-connection.sh
 
 
staying-connected.png
staying-connected.png
 
 

Repository files navigation

logo

ASL3 Check Connection Script

This is a simple AllStarLink Version 3 helper script for Debian 12 that checks to see if your node is connected to another node.

If your node is not connected to the node you choose, the script will automatically send the connect command and reconnect it.

This can be useful if you want your AllStarLink node to stay connected to a hub, repeater, private node, or another AllStarLink node.

  • Installation

What This Installs

This installer will install the needed files to:

/etc/asterisk/local/

The main files are:

/etc/asterisk/local/check-connection.sh
/etc/asterisk/local/check_connection.conf

The script reads the settings from:

/etc/asterisk/local/check_connection.conf

The script can also be run from cron so it can check the connection automatically.

What It Does

This script checks your AllStarLink node and looks to see if it is connected to the node number you have listed in the config file.

If the node is already connected, it does nothing.

If the node is not connected, it sends the AllStarLink connect command and attempts to reconnect.

For example, if you want your node to stay connected to node 57841, the script can automatically send:

*357841

That means the script is using the normal AllStarLink connect command.

Important Note

This script is intended for AllStarLink Version 3 running on Debian.

It is designed to be simple and easy to understand.

Please read the script before using it. Linux will do exactly what you tell it to do, even if you had more coffee than sleep.

Installation

Install Instructions

First we download the installer script file:

wget https://raw.githubusercontent.com/KD5FMU/Staying-Connected/refs/heads/main/install-asl3-check-connection.sh

Then make it executable:

sudo chmod +x install-asl3-check-connection.sh

Then we can execute the installer script:

sudo ./install-asl3-check-connection.sh

Once the installer is finished, you will need to edit the config file.

sudo nano /etc/asterisk/local/check_connection.conf

Config File

Inside the config file you will need to set your local node number and the node number you want to stay connected to.

Example:

LOCAL_NODE="577881"
TARGET_NODE="57841"

Change these numbers to match your own AllStarLink setup.

Example:

LOCAL_NODE="YOUR_NODE_NUMBER"
TARGET_NODE="NODE_TO_STAY_CONNECTED_TO"

Save the file.

In nano:

CTRL + O
ENTER
CTRL + X

Make Sure The Script Is Executable

The installer should already do this for you, but if you need to do it manually, run:

sudo chmod +x /etc/asterisk/local/check-connection.sh

Test The Script Manually

You can test the script by running:

sudo /etc/asterisk/local/check-connection.sh

If your node is already connected to the target node, the script should report that it is already connected.

If your node is not connected, it should attempt to reconnect.

Test It In A Cron-Like Environment

Cron does not always use the same PATH that your normal terminal uses.

To test it more like cron will run it, use:

sudo env -i PATH="/usr/bin:/bin" /etc/asterisk/local/check-connection.sh

If it runs correctly there, it should also work from cron.

Add It To Cron

To have the script check the connection automatically, edit root's crontab:

sudo crontab -e

Then add a line like this:

*/5 * * * * /etc/asterisk/local/check-connection.sh >/dev/null 2>&1

This will run the script every 5 minutes.

If you want it to check every minute, use this instead:

* * * * * /etc/asterisk/local/check-connection.sh >/dev/null 2>&1

View The Logs

The script uses the system logger with the tag:

asl3-check-connection

You can view the logs with:

sudo journalctl -t asl3-check-connection

To watch the logs live:

sudo journalctl -t asl3-check-connection -f

Common Problems

Permission Denied

If you see something like this:

Permission denied

Run:

sudo chmod +x /etc/asterisk/local/check-connection.sh

Then test it again:

sudo /etc/asterisk/local/check-connection.sh

Asterisk Command Not Found

If you see something like this:

ERROR: asterisk command not found.

This usually means the script could not find the asterisk command when running from cron.

This script should use the full path to Asterisk.

You can check where Asterisk is installed by running:

command -v asterisk

On many ASL3 systems, it should be:

/usr/sbin/asterisk

Uninstall Instructions

If you want to remove this script from your system, first remove the cron entry.

Open root's crontab:

sudo crontab -e

Remove the line that looks like this:

*/5 * * * * /etc/asterisk/local/check-connection.sh >/dev/null 2>&1

Then remove the installed script and config file:

sudo rm -f /etc/asterisk/local/check-connection.sh
sudo rm -f /etc/asterisk/local/check_connection.conf

That will remove the check connection script from your system.

Manual Cleanup

After uninstalling, you can check to make sure the files are gone:

ls -l /etc/asterisk/local/check-connection.sh
ls -l /etc/asterisk/local/check_connection.conf

If the files are removed, you may see:

No such file or directory

That is okay. That means they are gone.

License

This project is licensed under the MIT License.

By submitting a contribution to this repository, you agree that your contribution is licensed under the same MIT License.

Contributing

Contributions are welcome, but please only submit code that you wrote yourself or code that you have the legal right to contribute.

By submitting a pull request, patch, issue comment containing code, or other contribution, you agree that your contribution is licensed under the same license as this project.

Please do not submit copied code from another project unless the license is compatible and all required copyright notices are preserved.

Final Note

I hope this helps make your AllStarLink node a little more dependable.

73!

About

This is a script file installer that will help you stay connected to the node or nodes you designate

Resources

Readme
MIT license

Contributing

Contributing
Activity

Stars

1 star

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.