#! /bin/sh#### BEGIN INIT INFO# Provides: yourinfo### END INIT INFO## Author: Adam (dotevo) Jordanek #STRONA="http://dotevo.yoyo.pl/statystyka.php5?"while [ true ]do UPTIME=$(uptime | awk '{print $3}') ETH0DOWN=$(/sbin/ifconfig eth0 | grep 'RX byte' | awk '{print $3 $4}') ETH0UP=$(/sbin/ifconfig eth0 | grep 'RX byte' | awk '{print $7 $8}') WIFI0DOWN=$(/sbin/ifconfig wifi0 | grep 'RX byte' | awk '{print $3 $4}') WIFI0UP=$(/sbin/ifconfig wifi0 | grep 'RX byte' | awk '{print $7 $8}') FULL="${STRONA}pass='*******'&uptime='${UPTIME}'ð0d='${ETH0DOWN}'ð0u='${ETH0UP}'&wifi0d='${WIFI0DOWN}'&wifi0u='${WIFI0UP}'" echo $FULL wget $FULL -o cos rm cossleep 2mdone
#! /bin/sh -e#### BEGIN INIT INFO# Provides: yourinfo### END INIT INFO## Author: Adam (dotevo) Jordanek #set -ePATH=/bin:/usr/bin:/sbin:/usr/sbinDAEMON=/usr/sbin/yourinfotest -x $DAEMON || echo "/usr/sbin/yourinfo not found" && exit 0. /lib/lsb/init-functionscase "$1" in start) log_daemon_msg "Start" "yourinfo" echo "started" start_daemon $DAEMON log_end_msg $? ;; stop) log_daemon_msg "Stop" "yourinfo" killproc $DAEMON log_end_msg $? ;; force-reload|restart) $0 stop $0 start ;; *) echo "Usage: /etc/init.d/yourinfo {start|stop|restart|force-reload}" exit 1 ;;esacexit 0
ale wie ktoś jak się to dodaje do listy skryptów odpalanych na start? kiedyś to robiłem ale już nie pamiętam
The scripts in this directory are executed each time the system entersthis runlevel.The scripts are all symbolic links whose targets are located in/etc/init.d/ .To disable a service in this runlevel, rename its script in this directoryso that the new name begins with a 'K' and a two-digit number, where thenumber is the difference between the two-digit number following the 'S'in its current name, and 100. To re-enable the service, rename the scriptback to its original name beginning with 'S'.For a more information see /etc/init.d/README.
#!/bin/sh -e## rc.local## This script is executed at the end of each multiuser runlevel.# Make sure that the script will "exit 0" on success or any other# value on error.## In order to enable or disable this script just change the execution# bits.## By default this script does nothing.. /katalog/jakis_skrypt # . wkleja zawartosc skryptu do skryptu # tak samo jak w php: include('plik.php'); # albo w C/C++: #include "cos.h" oraz #include ""/katalog/moj_skryptexit 0
Hmm piszesz takie skrypty a tego nie wiesz... (sorki za sarkazm).
Jak skończę to udostępnię to na GPL ;]