{"id":50434138,"url":"https://github.com/markc/sh-old","last_synced_at":"2026-05-31T16:02:51.756Z","repository":{"id":340458390,"uuid":"91526081","full_name":"markc/sh-old","owner":"markc","description":"A set of bash shell scripts to setup and manage a simple Mail, Web and DNS server using either Debian, Ubuntu, CachyOS, Alpine or OpenWRT","archived":false,"fork":false,"pushed_at":"2025-07-16T03:35:56.000Z","size":1500,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T11:15:25.646Z","etag":null,"topics":["aliases","alpine-linux","bash-scripting","cachyos","debian","dovecot","mariadb","netserva-hcp","nginx","postfix","powerdns","roundcube-webmail","server-management","shell-scripts","sqlite","ubuntu-server"],"latest_commit_sha":null,"homepage":"https://netserva.org","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-05-17T02:43:28.000Z","updated_at":"2026-04-23T06:45:13.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/markc/sh-old","commit_stats":null,"previous_names":["markc/sh"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/markc/sh-old","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markc%2Fsh-old","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markc%2Fsh-old/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markc%2Fsh-old/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markc%2Fsh-old/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markc","download_url":"https://codeload.github.com/markc/sh-old/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markc%2Fsh-old/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33737692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aliases","alpine-linux","bash-scripting","cachyos","debian","dovecot","mariadb","netserva-hcp","nginx","postfix","powerdns","roundcube-webmail","server-management","shell-scripts","sqlite","ubuntu-server"],"created_at":"2026-05-31T16:02:46.656Z","updated_at":"2026-05-31T16:02:51.751Z","avatar_url":"https://github.com/markc.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"    bash \u003c(wget -qLO - https://raw.githubusercontent.com/markc/sh/master/bin/setup-sh)\n\n# NetServa SH\n\nThis **SH**ell project is a set of shell aliases and env variables to help\nmanage your CLI shell from an upstream (Github) repository. The project\nalso includes an associated collection of shell scripts to setup and manage\na simple Web, Mail and DNS server which also provides a foundation for the\n[NetServa HCP] PHP web interface.\n\nCurrently tested on:\n```\n- Debian Bookworm      # Mostly done\n- Ubuntu Lunar         # Most tested\n- CachyOS (Arch)       # Partly done\n- Alpine Edge          # Almost done\n- OpenWrt Latest       # WIP\n```\n## Usage\n\nThe simplest way to install and setup this project is to make sure `bash`,\n`wget` and `git` are installed first then copy and paste this one-liner as\nroot. Please [review the script] at Github first...\n\n    bash \u003c(wget -qLO - https://raw.githubusercontent.com/markc/sh/master/bin/setup-sh)\n\nTo install this project manually, copy and paste these 3 lines below...\n\n    git clone --depth 1 https://github.com/markc/sh ~/.sh\n    ~/.sh/bin/shm install\n    . ~/.shrc\n\nThe above will clone the Github repository to a folder called `.sh` in your\nhome directory and activate the system. If you have any problems with the\ninstalled symlinks then just remove them with...\n\n    shm remove\n\nor to remove the entire system use...\n\n    shm removeall\n\nYou can pull and push from your own forked repo without having to cd into\nthe ~/.sh installation first...\n\n    shm pull\n    shm push\n\nEasily reset the RWX permsissions of all SH scripts to a safe(r) default...\n\n    shm perms\n\nJust type `alias` to see a set of simple aliases, typing `?` will show the\nmost common ones with some explanation of their usage and `eh` can be used\nto customize this list. And yes, `nano` is the default editor of (my)\nchoice. Feel free to replace the `e` alias with **vi** or any other editor\nby typing `es` (Edit Sh) and add `alias e='/usr/bin/vi'` and `export\nEDITOR='/usr/bin/vi'` then ctl-x (for nano) which will make vi the default\neditor. `es` edits the persistent ~/.myrc file and sources ~/.shrc (which\nwithin itself sources ~/.myrc as personal env var and alias overrides.)\n\n    ? ....... Show this help\n    e ....... The nano Editor with a simplified interface\n    f ....... Find named files and list them (recursive)\n    i ....... Install a package\n    l ....... Tail the end of the most common system Logfile\n    n ....... Create a new Note in the users home dir\n    m ....... Menu System (TODO)\n    p ....... Search for a particular running Process\n    q ....... Query text string within files (recursive)\n    r ....... Remove a package\n    s ....... Search for a package\n    u ....... Update the package system\n    .. ...... Change to parent directory\n    eh ...... Edit this Help file\n    em ...... Edit Menu file\n    es ...... Edit ~/.myrc and re-execute ~/.shrc\n    la ...... List All files including dotfiles\n    ll ...... Long Listing\n    ls ...... Short form List\n    se ...... Sudo Edit text files as root\n    sn ...... Show Notes created with \"n\"\n    env ..... Show Environmental global variables\n    alias ... To show all current Aliases\n\nSome other useful aliases not list above are...\n\n    ram ..... To show a simple sorted list of apps and their ram usage\n    block ... Block or drop a an IP from accessing the system\n    unblock . Unblock the above blocked IP\n    shblock . Show all blocked IPs\n\nUse `alias | grep log` to see some of the logging aliases, tweak or add\nmore using `es` to edit your custom and long term persistent `~/.myrc` file.\n\n`n` (notes) and `sn` (show notes) is an ultra simple note taking system and\n(TODO) should be expanded to keep the notes in a private Git repo (to allow\nfor the potential of passwords and any other sensitive info.)\n\n## Bash Scripts\n\nThe above env var and alias management feature is useful in it's own right\nand the only `~/.sh/bin` script needed is `~/.sh/bin/shm` (SH Manager) which\nprovides some basic functionality. `shm pull` and `shm push` are the most\nfrequently used and simply allow to `git pull` and `git push` from anywhere.\n\n    shm [install|pull|push|remove|removeall|perms]\n\nAll the other scripts assist with server side virtual host management and\ncan be ignored if not needed. If used then the config files for each vhost\nare stored in `~/.vhosts`. The initial (perhaps only) entry would be for\nthe current host (ie; when using LXD containers) using `hostname -f` as\nthe full filename path, ie; `cat ~/.vhosts/$(hostname -f)` should provide\nthe settings for the current host after `setup-fqdn` is run. It could be\nset up manually using the below as an example of a non-public local LAN\ndomainname assuming that `hostname` returns `myhost`...\n```\n~ sethost sysadm@netserva.local\n~ gethost # or cat ~/.vhosts/$(hostname -f)\nADMIN='sysadm'\nAHOST='netserva.local'\nAMAIL='admin@netserva.local'\nANAME='System Administrator'\nAPASS='phSdkd1XVxXWVDyT'\nA_GID='1000'\nA_UID='1000'\nBPATH='/home/backups'\nCIMAP='/etc/dovecot'\nCSMTP='/etc/postfix'\nC_DNS='/etc/powerdns'\nC_FPM='/etc/php/8.2/fpm'\nC_SQL='/etc/mysql'\nC_SSL='/etc/ssl'\nC_WEB='/etc/nginx'\nDBMYS='/var/lib/mysql'\nDBSQL='/var/lib/sqlite'\nDHOST='localhost'\nDNAME='sysadm'\nDPASS='xb6D4CRDKSSkkoIl'\nDPATH='/var/lib/sqlite/sysadm/sysadm.db'\nDPORT='3306'\nDTYPE='mysql'\nDUSER='sysadm'\nEPASS='j6Wrh0tWbbZfzh19'\nEXMYS='mysql -BN sysadm'\nEXSQL='sqlite3 /var/lib/sqlite/sysadm/sysadm.db'\nIP4_0='192.168.0.2'\nMHOST='netserva.local'\nMPATH='/home/u/netserva.local/home'\nOSMIR='archive.ubuntu.com'\nOSREL='lunar'\nOSTYP='ubuntu'\nSQCMD='mysql -BN sysadm'\nTAREA='Australia'\nTCITY='Sydney'\nUPASS='rSfQ66I137AHjedp'\nUPATH='/home/u/netserva.local'\nUUSER='sysadm'\nU_GID='1000'\nU_SHL='/bin/bash'\nU_UID='1000'\nVHOST='netserva.local'\nVPATH='/home/u'\nVUSER='admin'\nV_PHP='8.2'\nWPASS='phSdkd1XVxXWVDyT'\nWPATH='/home/u/netserva.local/var/www/html'\nWPUSR='wzoqqh'\nWUGID='www-data'\n```\nIf this host is a server then using `addvhost example.org` would add\nyet another virtual host and create another config file called\n`~/.vhosts/example.org` where `grep PASS ~/.vhosts/example.org` would\nreveal the auto generated passwords used during the setup procedure.\n\n## More documentation\n\nFor now, see [NetServa HCP] for more docmentation about using the hosting\nmanagement `setup-*` scripts. Some of the scripts in the `bin/` dir are\nmeant to be used from the PHP web interface but can generally also be used\nstandalone from the command line as well.\n\nThere are also some semi-related posts on my [personal blog].\n\n_All scripts and documentation are Copyright (C) 1995-2024 Mark Constable and Licensed [AGPL-3.0]_\n\n[Github]: https://github.com/markc/sh\n[NetServa HCP]: https://github.com/markc/hcp\n[review the script]: https://github.com/markc/sh/blob/master/bin/setup-sh\n[AGPL-3.0]: http://www.gnu.org/licenses/agpl-3.0.html\n[fork this project]: https://help.github.com/articles/fork-a-repo\n[pull requests]: https://help.github.com/articles/using-pull-requests\n[personal blog]: https://markc.blog\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkc%2Fsh-old","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkc%2Fsh-old","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkc%2Fsh-old/lists"}