From 9cb56dabb676391a9382731347e8d2b07b9437a5 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Sun, 7 Apr 2024 13:25:49 +0200 Subject: big cleanup --- bin/aux/addwuser.rc | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100755 bin/aux/addwuser.rc (limited to 'bin/aux/addwuser.rc') diff --git a/bin/aux/addwuser.rc b/bin/aux/addwuser.rc deleted file mode 100755 index 9364d39..0000000 --- a/bin/aux/addwuser.rc +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/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) { - mkdir -p etc/users/$g - echo $user_name >> etc/users/$g/members - } - -- cgit v1.2.3