| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #!/bin/bash
- # info: rebuild system user
- # options: USER [RESTART]
- #
- # The function rebuilds system user account.
- #----------------------------------------------------------#
- # Variable&Function #
- #----------------------------------------------------------#
- # Argument defenition
- user=$1
- restart=$2
- # Includes
- source $VESTA/conf/vesta.conf
- source $VESTA/func/main.sh
- source $VESTA/func/rebuild.sh
- # Export sbin
- export PATH=$PATH:/usr/sbin
- #----------------------------------------------------------#
- # Verifications #
- #----------------------------------------------------------#
- check_args '1' "$#" 'USER [RESTART]'
- validate_format 'user'
- is_object_valid 'user' 'USER' "$user"
- is_object_unsuspended 'user' 'USER' "$user"
- #----------------------------------------------------------#
- # Action #
- #----------------------------------------------------------#
- # Rebuild user
- rebuild_user_conf
- #----------------------------------------------------------#
- # Vesta #
- #----------------------------------------------------------#
- # Logging
- log_event "$OK" "$EVENT"
- exit
|