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