swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit 06b6d470ed4bc362280a3b8f6c5baac762c7fa2d
parent 7f3c29c4028daba71e374298bc5669d785cd6af9
Author: uriel@soma <unknown>
Date:   Fri, 13 Feb 2009 00:56:15 +0000

Script to add users.
Diffstat:
Abin/aux/addwuser.rc | 31+++++++++++++++++++++++++++++++
Msites/werc.cat-v.org/docs/config_options.md | 8++++----
2 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/bin/aux/addwuser.rc b/bin/aux/addwuser.rc @@ -0,0 +1,31 @@ +#!/usr/bin/env rc + +if(! ~ $#werc_root 0) + cd $werc_root + +fn usage { + if(! ~ $#* 0) + echo $0: $* >[1=2] + echo 'Usage:' $0 'user_name user_password [groups ...]' >[1=2] + exit usage +} + +if(! test -d etc/users/ + usage 'Run for root of werc installation or set $werc_root' + +user_name=$1 +shift +user_pass=$1 +shift +user_groups=$* + +if(~ $"user_name '' || ~ $"user_pass '') + usage + +mkdir etc/users/$user_name +echo $user_pass > etc/users/$user_name/password + +if(! ~ $#user_groups 0) + for(g in $user_groups) + echo $user_name >> etc/groups/$g + diff --git a/sites/werc.cat-v.org/docs/config_options.md b/sites/werc.cat-v.org/docs/config_options.md @@ -12,9 +12,9 @@ Variables: * siteSubTitle * Html header meta tags: - * meta_description - * meta_keywords - * extraHeaders - Raw extra headers. + * meta_description - `<meta name="description" ...` + * meta_keywords - `<meta name="keywords" ...` + * extraHeaders - Raw extra html headers, the content of this var will be inserted inside the `<head>` tag.. Sidebar and navigation @@ -26,7 +26,7 @@ Variables: Functions: -* `conf_hide_paths [paths_patterns ...]` - Hide the given patterns from navigation menu, sitemap and dir listing (do *not* depend on this for securty!). +* `conf_hide_paths [path_patterns ...]` - Hide the given patterns from navigation menu, sitemap and dir listing (do *not* depend on this for securty!). Http control ------------