Run the main setup once as root:
https://github.com/JACKURUVI99/Delta-Blog-Setup/
cd Delta-Blog-Setup
sudo mv scripts ~/scripts
cd /scripts
sudo bash delta-setupdelta-setup performs:
- Makes
yqexecutable at/usr/local/bin/yq - Runs
.initusers,.notifysetup,.promotsetup,.setupcorn - Starts
.notifyserverin background
/scripts/
├── .initusers # Sets up users, groups, and directories (calls .permission)
├── .notifysetup # Sets up .viewnotify in all user directories
├── .notifycorn # Cron script to count new notifications
├── .notifyserver # Netcat server to broadcast notifications
├── .promotsetup # Sets ACLs for promotion
├── .cronrunner # Triggers adminpannel on valid dates
├── .permission # Manages script and directory permissions
├── manageblogs # Author script for creating/editing/publishing blogs
├── suprise # Users subscribe or unsubscribe to authors
├── .viewnotify # Reads and clears notifications on login
├── blogfilter # Moderator script to review/approve/reject blogs
├── userFY # Admin script to get user and blog details
├── approvepromotion # Admin script to approve/deny promotions
├── promote-req # User script to request promotion
├── .promote # Core logic for promotion (used internally)
├── adminpannel # Generates analytics report
├── users.yaml # Initial user-role definitions
├── subscriptions.yaml # List of author subscriptions
├── blogs_initial.yaml # Template blogs YAML
└── reports/ # Report outputs generated by adminpannel
g_user: Regular usersg_author: Users with blogging permissionsg_mod: Moderators with filtering rightsg_admin: Admins with complete access and report control
| Script | Role | Description | Usage Example |
|---|---|---|---|
| suprise | User | Subscribe or unsubscribe from an author | bash /scripts/suprise bala |
| promote-req | User | Request for promotion | sudo /scripts/promote-req |
| blogfilter | Moderator | Approve or block author blogs | bash /scripts/blogfilter bala |
| userFY | Admin | View blog and user statistics | bash /scripts/userFY username |
| approvepromotion | Admin | Approve or deny promotion requests | sudo /scripts/approvepromotion username approve |
| manageblogs | Author | Create, edit, and publish blogs | bash /scripts/manageblogs -super blog1 |
Note: Run suprise again to unsubscribe from the same author.
Scripts starting with a dot (.) are background/system-level scripts:
| Script | Purpose |
|---|---|
| .initusers | Initializes users and directories; invokes .permission |
| .notifysetup | Installs .viewnotify in user home directories |
| .notifycorn | Periodically checks and shows new notification count |
| .notifyserver | Netcat-based background notification listener |
| .promotsetup | Sets ACLs required for promotion mechanism |
| .permission | Sets up group and file-level permissions (invoked by .initusers) |
| .cronrunner | Validates schedule and triggers adminpannel |
These are all invoked automatically through the main delta-setup script.
Ensure notify server starts:
nohup bash /scripts/.notifyserver > /dev/null 2>&1 &- Author publishes a blog using
manageblogs - A Netcat message is sent to localhost
.notifyserverreceives it and looks up subscribers insubscriptions.yaml- Relevant users’ notification logs are updated
.viewnotifyshows messages on next login or manual run
.cronrunneris scheduled using crontab- It validates if current day is:
- Thursday
- First or last Saturday of Feb, May, Aug, Nov
- If valid, it triggers
adminpannel - Report is saved at
/scripts/reports/DATE_TIME.yaml
@reboot /scripts/.notifyserver
*/1 * * * * /scripts/.notifycorn
0 10 * * * /scripts/.cronrunnerYour Notifications:
- New post from bala: 'newblog'
blogs:
- file_name: "travelblog"
author: "bala"
categories: ["Travel", "Lifestyle"]
reads: 12
categories:
Travel: 2
Lifestyle: 1
top_articles:
- file_name: "travelblog"
reads: 12
total_published: 5
total_deleted: 1- After promotion or demotion, the user must log out and log back in for changes to take effect.
- This system has been tested and is functional on Arch Linux.