update rc
This commit is contained in:
+5
-5
@@ -11,12 +11,8 @@
|
||||
## ## ##
|
||||
## ## ##
|
||||
|
||||
#----- colors -------
|
||||
. /usr/lib/init/colors.sh
|
||||
#--------------------
|
||||
|
||||
#---------------- variables --------------------------
|
||||
rootdir=/
|
||||
rootdir=$(pwd)
|
||||
repofile=$rootdir/etc/pm/repo
|
||||
packagesqueryfile=$rootdir/usr/share/pm/query
|
||||
reposquerydir=$rootdir/usr/share/pm/repos
|
||||
@@ -24,6 +20,10 @@ cachedpkgdir=$rootdir/var/cache/pm/pkg
|
||||
installedpackagesdir=$rootdir/usr/share/pm/packages
|
||||
#-----------------------------------------------------
|
||||
|
||||
#----- colors -------
|
||||
. $rootdir/usr/lib/init/colors.sh
|
||||
#--------------------
|
||||
|
||||
#---------------- check root priveleges function ------------------------
|
||||
checkroot() {
|
||||
if [[ $(id -u) != 0 ]]; then
|
||||
|
||||
+4
-5
@@ -112,8 +112,8 @@ status() {
|
||||
|
||||
#-------------- print help function -------------------------
|
||||
help() {
|
||||
echo "
|
||||
** rc usage:
|
||||
printf "
|
||||
$BLUE**$GREEN rc usage$RESET:$BWHITE
|
||||
rc add [init.d script name] - add service on boot
|
||||
rc del [init.d script name] - delete service from boot
|
||||
rc start [init.d script name] - start service
|
||||
@@ -123,15 +123,14 @@ help() {
|
||||
rc bootlist - list enabled services
|
||||
rc status [init.d script name] - check service status
|
||||
|
||||
examples:
|
||||
$BLUE**$GREEN examples$RESET:$BWHITE
|
||||
rc add httpd
|
||||
rc del httpd
|
||||
rc start httpd
|
||||
rc stop httpd
|
||||
rc restart httpd
|
||||
rc list
|
||||
rc bootlist
|
||||
"
|
||||
rc bootlist\n$RESET"
|
||||
}
|
||||
#------------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user