How run an ownmade script at boot
How run an ownmade script at boot
Hi all,
i've made a stupid script for clean .log file created by oscam.
If i run it via terminal, it works, but i've put a file in /mnt/etc/init.d/99_99_clean.init
#!/bin/sh
. /mnt/opt/privateer/usr/bin/oscam/clean
and won't work.
Permissions are right
Probably i don't get an obvious thing (i'm not a programmer, i'm just trying to learn how scripts work and how use 'em)
Can you give me a help ?
i've made a stupid script for clean .log file created by oscam.
If i run it via terminal, it works, but i've put a file in /mnt/etc/init.d/99_99_clean.init
#!/bin/sh
. /mnt/opt/privateer/usr/bin/oscam/clean
and won't work.
Permissions are right
Probably i don't get an obvious thing (i'm not a programmer, i'm just trying to learn how scripts work and how use 'em)
Can you give me a help ?
UE32F6400 - T-MST12DEUC-1119.0,BT-G - SamyGO Extensions on F series
" I don't know ... for now ... "
" I don't know ... for now ... "
Re: How run an ownmade script at boot
Pay attention to script structure and arguments. Check other scripts and get selfinformed...
case $1 in
start)
Your code here
;;
esac
case $1 in
start)
Your code here
;;
esac
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]
DO NOT EVER INSTALL FIRMWARE UPGRADE
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]
DO NOT EVER INSTALL FIRMWARE UPGRADE
Re: How run an ownmade script at boot
Thank juusso for reply
So
#!/bin/sh
case $1 in
start)
. /mnt/opt/privateer/usr/bin/oscam/clean
;;
esac
Also is there a wiki about init priority (01_01 will be execute before 99_99 ?) ?
Because i need to delete log before oscam starts.
I remember that i saw something about it, but i think it was a talk in a thread and not a thread ...
Thank you so much
So
#!/bin/sh
case $1 in
start)
. /mnt/opt/privateer/usr/bin/oscam/clean
;;
esac
Also is there a wiki about init priority (01_01 will be execute before 99_99 ?) ?
Because i need to delete log before oscam starts.
I remember that i saw something about it, but i think it was a talk in a thread and not a thread ...
Thank you so much
UE32F6400 - T-MST12DEUC-1119.0,BT-G - SamyGO Extensions on F series
" I don't know ... for now ... "
" I don't know ... for now ... "
Re: How run an ownmade script at boot
Hex edit libOscam.so and change /dtv/libOscam.log to /dev/null
No more log
No more log
I do NOT receive any PM. Please use forum.
Re: How run an ownmade script at boot
Thanks zoe,
but i'm trying to launch a script from init.d
just to try
that's why i haven't use your solution yet
clear a log file script it's easy to do for my (un)knowledge.
Via terminal works, but i can't do it on boot.
last try is
[/b]
Is it so hard to achieve ?
but i'm trying to launch a script from init.d
just to try
that's why i haven't use your solution yet
clear a log file script it's easy to do for my (un)knowledge.
Via terminal works, but i can't do it on boot.
last try is
Code: Select all
#!/bin/sh
. /dtv/SGO.env
case $1 in
start)
/mnt/opt/privateer/usr/bin/oscam/clean
;;
esac
Is it so hard to achieve ?
UE32F6400 - T-MST12DEUC-1119.0,BT-G - SamyGO Extensions on F series
" I don't know ... for now ... "
" I don't know ... for now ... "
Re: How run an ownmade script at boot
Are you using Notepad++ with linefeeds set to Unix Format (LF)?
I do NOT receive any PM. Please use forum.
Re: How run an ownmade script at boot
No, Text Edit with make plain text option (osx).zoelechat wrote:Are you using Notepad++ with linefeeds set to Unix Format (LF)?
Usually it works when edited some samyscripts (i've modded "oscam started" in "oscaaaaam" and worked).
Is it in correct form ? Should it works ?
i can try notepad++ if it can be the problem.
UE32F6400 - T-MST12DEUC-1119.0,BT-G - SamyGO Extensions on F series
" I don't know ... for now ... "
" I don't know ... for now ... "
Re: How run an ownmade script at boot
It depends, if you edit an existing script it will keep its linefeed type, but if you start one from scratch it might be different/wrong default...
Just to be sure you can launch your startup script manually and give output:
Just to be sure you can launch your startup script manually and give output:
Code: Select all
sh -x /mnt/etc/init.d/99_99_clean.init start
I do NOT receive any PM. Please use forum.
Re: How run an ownmade script at boot
SpoilerShow
VDLinux#> sh -x /mnt/etc/init.d/99_99_clean.init start
+ . /dtv/SGO.env
+ SYSROOT=/mnt
+ MOUNT_PATH=/dtv/usb/sdb
+ export USER_FIRMWARE=MST12
+ export KMOD_VER=0116
+ export MOD_DIR=/mnt/lib/modules/3.0.33
+ export TMPDIR=/dtv
+ export HOME=/mtd_rwcommon
+ export SMB_CONF_PATH=/mnt/etc/samba/smb.conf
+ LOGFILE=/mnt/samygo.log
+ LD_LIBRARY_PATH=/mnt/opt/privateer/lib:/mnt/opt/privateer/usr/lib:/mnt/lib:/mnt/usr/lib:/tmp/bin:/mtd_cmmlib/RECOGNITION_LIB:/lib:/mtd_cmmlib/lib:/mtd_cmmlib/Comp_LIB:/mtd_exe/lib:/mtd_cmmlib/YWidget_LIB:/mtd_cmmlib/InfoLink/lib/plugin/Static:/mtd_appdata/moip:/mtd_cmmlib/GAME_LIB:/mtd_appdata/gemstar:/mtd_cmmlib/DRM_LIB:/Java/lib:/mtd_cmmlib/InfoLink/lib:/mtd_appext/WidgetEngine:/mtd_appext/Webkit:/mtd_exe/WebServerApp/bin:/mtd_cmmlib/CBRE:/mtd_cmmlib/CBRE/bin/lib:/mtd_cmmlib/flashplayer/libs:/mtd_appdata/Runtime/lib/CairoShadow:/mtd_appdata/Runtime/lib:/mtd_appdata/Runtime/XorgLibs:/mtd_cmmlib/CM_LIB:/mtd_appext/OIPF/lib:/mtd_exe/OIPF/lib:/mtd_contents:/dtv
+ PATH=/mnt/opt/privateer/sbin:/mnt/opt/privateer/bin:/mnt/opt/privateer/usr/bin:/mnt/opt/privateer/usr/sbin:/mnt/sbin:/mnt/bin:/mnt/usr/bin:/mnt/usr/sbin:/tmp/bin:/usr/sbin:/usr/bin:/bin:/sbin:/etc/Scripts:/util:/mtd_appdata/Runtime/bin
+ export ENV=/dtv/.ashrc
+ export FRAMEBUFFER=/dev/sam/fb0
+ export DISTROOT=/mnt/opt/privateer
+ export LIBSO_DIR=/mnt/opt/privateer/usr/libso
+ export TERM=linux
+ export LS_OPTIONS=--color=auto
+ export TZ=GMT-2
+ /mnt/opt/privateer/usr/bin/oscam/clean
+ . /dtv/SGO.env
+ SYSROOT=/mnt
+ MOUNT_PATH=/dtv/usb/sdb
+ export USER_FIRMWARE=MST12
+ export KMOD_VER=0116
+ export MOD_DIR=/mnt/lib/modules/3.0.33
+ export TMPDIR=/dtv
+ export HOME=/mtd_rwcommon
+ export SMB_CONF_PATH=/mnt/etc/samba/smb.conf
+ LOGFILE=/mnt/samygo.log
+ LD_LIBRARY_PATH=/mnt/opt/privateer/lib:/mnt/opt/privateer/usr/lib:/mnt/lib:/mnt/usr/lib:/tmp/bin:/mtd_cmmlib/RECOGNITION_LIB:/lib:/mtd_cmmlib/lib:/mtd_cmmlib/Comp_LIB:/mtd_exe/lib:/mtd_cmmlib/YWidget_LIB:/mtd_cmmlib/InfoLink/lib/plugin/Static:/mtd_appdata/moip:/mtd_cmmlib/GAME_LIB:/mtd_appdata/gemstar:/mtd_cmmlib/DRM_LIB:/Java/lib:/mtd_cmmlib/InfoLink/lib:/mtd_appext/WidgetEngine:/mtd_appext/Webkit:/mtd_exe/WebServerApp/bin:/mtd_cmmlib/CBRE:/mtd_cmmlib/CBRE/bin/lib:/mtd_cmmlib/flashplayer/libs:/mtd_appdata/Runtime/lib/CairoShadow:/mtd_appdata/Runtime/lib:/mtd_appdata/Runtime/XorgLibs:/mtd_cmmlib/CM_LIB:/mtd_appext/OIPF/lib:/mtd_exe/OIPF/lib:/mtd_contents:/dtv
+ PATH=/mnt/opt/privateer/sbin:/mnt/opt/privateer/bin:/mnt/opt/privateer/usr/bin:/mnt/opt/privateer/usr/sbin:/mnt/sbin:/mnt/bin:/mnt/usr/bin:/mnt/usr/sbin:/tmp/bin:/usr/sbin:/usr/bin:/bin:/sbin:/etc/Scripts:/util:/mtd_appdata/Runtime/bin
+ export ENV=/dtv/.ashrc
+ export FRAMEBUFFER=/dev/sam/fb0
+ export DISTROOT=/mnt/opt/privateer
+ export LIBSO_DIR=/mnt/opt/privateer/usr/libso
+ export TERM=linux
+ export LS_OPTIONS=--color=auto
+ export TZ=GMT-2
+ /mnt/opt/privateer/usr/bin/oscam/clean
UE32F6400 - T-MST12DEUC-1119.0,BT-G - SamyGO Extensions on F series
" I don't know ... for now ... "
" I don't know ... for now ... "
Re: How run an ownmade script at boot
Seems good, problem must be with /mnt/opt/privateer/usr/bin/oscam/clean then
Are you sure of permissions? (the ones of /mnt/etc/init.d/99_99_clean.init I mean)
Are you sure of permissions? (the ones of /mnt/etc/init.d/99_99_clean.init I mean)
I do NOT receive any PM. Please use forum.