NI-yWeb: intensive use of variables

Origin commit data
------------------
Branch: ni/coolstream
Commit: d809929679
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-01 (Sat, 01 Oct 2016)

Origin message was:
------------------
- NI-yWeb: intensive use of variables

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2016-10-01 15:53:02 +02:00
parent 07cb81be4d
commit 89a2d1946c
3 changed files with 33 additions and 25 deletions

View File

@@ -1,4 +1,8 @@
#!/bin/sh #!/bin/sh
. %(PRIVATE_HTTPDDIR)/scripts/_Y_Globals.sh
. %(PRIVATE_HTTPDDIR)/scripts/_Y_Library.sh
BNAME=${0##*/} BNAME=${0##*/}
case "$1" in case "$1" in

View File

@@ -1,4 +1,8 @@
#!/bin/sh #!/bin/sh
. %(PRIVATE_HTTPDDIR)/scripts/_Y_Globals.sh
. %(PRIVATE_HTTPDDIR)/scripts/_Y_Library.sh
BNAME=${0##*/} BNAME=${0##*/}
case "$1" in case "$1" in
@@ -11,111 +15,111 @@ case "$1" in
fcm_start) fcm_start)
echo "[$BNAME] fritzcallmonitor start" echo "[$BNAME] fritzcallmonitor start"
touch /var/etc/.fritzcallmonitor touch /var/etc/.fritzcallmonitor
/sbin/service fritzcallmonitor start >/dev/console $y_path_sbin/service fritzcallmonitor start >/dev/console
;; ;;
fcm_stop) fcm_stop)
echo "[$BNAME] fritzcallmonitor stop" echo "[$BNAME] fritzcallmonitor stop"
/sbin/service fritzcallmonitor stop >/dev/console $y_path_sbin/service fritzcallmonitor stop >/dev/console
rm -f /var/etc/.fritzcallmonitor rm -f /var/etc/.fritzcallmonitor
;; ;;
nfs_start) nfs_start)
echo "[$BNAME] nfs-server start" echo "[$BNAME] nfs-server start"
touch /var/etc/.nfsd touch /var/etc/.nfsd
/sbin/service nfsd start >/dev/console $y_path_sbin/service nfsd start >/dev/console
;; ;;
nfs_stop) nfs_stop)
echo "[$BNAME] nfs-server stop" echo "[$BNAME] nfs-server stop"
/sbin/service nfsd stop >/dev/console $y_path_sbin/service nfsd stop >/dev/console
rm -f /var/etc/.nfsd rm -f /var/etc/.nfsd
;; ;;
smb_start) smb_start)
echo "[$BNAME] samba-server start" echo "[$BNAME] samba-server start"
touch /var/etc/.samba touch /var/etc/.samba
/sbin/service samba start >/dev/console $y_path_sbin/service samba start >/dev/console
;; ;;
smb_stop) smb_stop)
echo "[$BNAME] samba-server stop" echo "[$BNAME] samba-server stop"
/sbin/service samba stop >/dev/console $y_path_sbin/service samba stop >/dev/console
rm -f /var/etc/.samba rm -f /var/etc/.samba
;; ;;
txc_start) txc_start)
echo "[$BNAME] tuxcal start" echo "[$BNAME] tuxcal start"
touch /var/etc/.tuxcald touch /var/etc/.tuxcald
/sbin/service tuxcald start >/dev/console $y_path_sbin/service tuxcald start >/dev/console
;; ;;
txc_stop) txc_stop)
echo "[$BNAME] tuxcal stop" echo "[$BNAME] tuxcal stop"
/sbin/service tuxcald stop >/dev/console $y_path_sbin/service tuxcald stop >/dev/console
rm -f /var/etc/.tuxcald rm -f /var/etc/.tuxcald
;; ;;
txm_start) txm_start)
echo "[$BNAME] tuxmail start" echo "[$BNAME] tuxmail start"
touch /var/etc/.tuxmaild touch /var/etc/.tuxmaild
/sbin/service tuxmaild start >/dev/console $y_path_sbin/service tuxmaild start >/dev/console
;; ;;
txm_stop) txm_stop)
echo "[$BNAME] tuxmail stop" echo "[$BNAME] tuxmail stop"
/sbin/service tuxmaild stop >/dev/console $y_path_sbin/service tuxmaild stop >/dev/console
rm -f /var/etc/.tuxmaild rm -f /var/etc/.tuxmaild
;; ;;
ina_start) ina_start)
echo "[$BNAME] inadyn start" echo "[$BNAME] inadyn start"
touch /var/etc/.inadyn touch /var/etc/.inadyn
/sbin/service inadyn start >/dev/console $y_path_sbin/service inadyn start >/dev/console
;; ;;
ina_stop) ina_stop)
echo "[$BNAME] inadyn stop" echo "[$BNAME] inadyn stop"
/sbin/service inadyn stop >/dev/console $y_path_sbin/service inadyn stop >/dev/console
rm -f /var/etc/.inadyn rm -f /var/etc/.inadyn
;; ;;
drop_start) drop_start)
echo "[$BNAME] dropbear start" echo "[$BNAME] dropbear start"
touch /var/etc/.dropbear touch /var/etc/.dropbear
/sbin/service dropbear start >/dev/console $y_path_sbin/service dropbear start >/dev/console
;; ;;
drop_stop) drop_stop)
echo "[$BNAME] dropbear stop" echo "[$BNAME] dropbear stop"
/sbin/service dropbear stop >/dev/console $y_path_sbin/service dropbear stop >/dev/console
rm -f /var/etc/.dropbear rm -f /var/etc/.dropbear
;; ;;
ush_start) ush_start)
echo "[$BNAME] ushare start" echo "[$BNAME] ushare start"
touch /var/etc/.ushare touch /var/etc/.ushare
/sbin/service ushare start >/dev/console $y_path_sbin/service ushare start >/dev/console
;; ;;
ush_stop) ush_stop)
echo "[$BNAME] ushare stop" echo "[$BNAME] ushare stop"
/sbin/service ushare stop >/dev/console $y_path_sbin/service ushare stop >/dev/console
rm -f /var/etc/.ushare rm -f /var/etc/.ushare
;; ;;
djm_start) djm_start)
echo "[$BNAME] djmount start" echo "[$BNAME] djmount start"
touch /var/etc/.djmount touch /var/etc/.djmount
/sbin/service djmount start >/dev/console $y_path_sbin/service djmount start >/dev/console
;; ;;
djm_stop) djm_stop)
echo "[$BNAME] djmount stop" echo "[$BNAME] djmount stop"
/sbin/service djmount stop >/dev/console $y_path_sbin/service djmount stop >/dev/console
rm -f /var/etc/.djmount rm -f /var/etc/.djmount
;; ;;
xud_start) xud_start)
echo "[$BNAME] xupnpd start" echo "[$BNAME] xupnpd start"
touch /var/etc/.xupnpd touch /var/etc/.xupnpd
/sbin/service xupnpd start >/dev/console $y_path_sbin/service xupnpd start >/dev/console
;; ;;
xud_stop) xud_stop)
echo "[$BNAME] xupnpd stop" echo "[$BNAME] xupnpd stop"
/sbin/service xupnpd stop >/dev/console $y_path_sbin/service xupnpd stop >/dev/console
rm -f /var/etc/.xupnpd rm -f /var/etc/.xupnpd
;; ;;
cro_start) cro_start)
echo "[$BNAME] crond start" echo "[$BNAME] crond start"
touch /var/etc/.crond touch /var/etc/.crond
/sbin/service crond start >/dev/console $y_path_sbin/service crond start >/dev/console
;; ;;
cro_stop) cro_stop)
echo "[$BNAME] crond stop" echo "[$BNAME] crond stop"
/sbin/service crond stop >/dev/console $y_path_sbin/service crond stop >/dev/console
rm -f /var/etc/.crond rm -f /var/etc/.crond
;; ;;
*) *)

View File

@@ -107,7 +107,7 @@ is_mount()
is_exec() is_exec()
{ {
F=$1 F=$1
test -x /var/bin/$F test -x $y_path_varbin/$F
return $? return $?
} }
@@ -265,7 +265,7 @@ case "$action" in
newcsreset) %(PRIVATE_HTTPDDIR)/scripts/Y_NI_Camd-control.sh newcs_reset;; newcsreset) %(PRIVATE_HTTPDDIR)/scripts/Y_NI_Camd-control.sh newcs_reset;;
vinfo) vinfo)
if ! [ -x /var/bin/$1 ]; then if ! [ -x $y_path_varbin/$1 ]; then
printf "%s" "n/a" printf "%s" "n/a"
exit exit
fi fi
@@ -273,7 +273,7 @@ case "$action" in
if [ "$CAM" = "GBOX" ]; then if [ "$CAM" = "GBOX" ]; then
CAM=GBOX.NET CAM=GBOX.NET
fi fi
V=$(/bin/vinfo $CAM /var/bin/$1) V=$($y_path_bin/vinfo $CAM $y_path_varbin/$1)
printf "%s" "${V//keine Informationen gefunden/}" printf "%s" "${V//keine Informationen gefunden/}"
;; ;;