diff --git a/etc/fstab b/etc/fstab new file mode 100644 index 0000000..4a16f9f --- /dev/null +++ b/etc/fstab @@ -0,0 +1,8 @@ +# +#/dev/root / ext4 rw,relatime 0 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0 +tmpfs /dev/shm tmpfs mode=1777 0 0 +tmpfs /tmp tmpfs mode=1777 0 0 +tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 +tmpfs /sys sysfs defaults 0 0 diff --git a/etc/group b/etc/group index a298035..1270985 100644 --- a/etc/group +++ b/etc/group @@ -1,4 +1,5 @@ root:x:0:root dnsmasq:x:963:dnsmasq sshd:x:33:sshd -nobody:x:65534: \ No newline at end of file +nobody:x:65534: +gitea:x:1000: \ No newline at end of file diff --git a/etc/hostname b/etc/hostname new file mode 100644 index 0000000..ab23474 --- /dev/null +++ b/etc/hostname @@ -0,0 +1 @@ +simple diff --git a/etc/hosts b/etc/hosts index 3f29fac..1a98f0e 100644 --- a/etc/hosts +++ b/etc/hosts @@ -1,2 +1,3 @@ 127.0.0.1 localhost -::1 localhost \ No newline at end of file +::1 localhost +127.0.1.1 simple.localdomain simple diff --git a/etc/init.d/gitea b/etc/init.d/gitea new file mode 120000 index 0000000..3f2ac1d --- /dev/null +++ b/etc/init.d/gitea @@ -0,0 +1 @@ +../../usr/lib/init/services/gitea.service \ No newline at end of file diff --git a/etc/inittab b/etc/inittab index b2e73e8..63684ae 100644 --- a/etc/inittab +++ b/etc/inittab @@ -1,11 +1,14 @@ +::sysinit:mkdir /dev/shm +::sysinit:mount -a ::sysinit:/etc/init.d/rcS ::ctrlaltdel:/sbin/reboot ::shutdown:/etc/init.d/rcK +::shutdown:umount -a -r tty1::respawn:/usr/bin/getty 38400 tty1 tty2::respawn:/usr/bin/getty 38400 tty2 tty3::respawn:/usr/bin/getty 38400 tty3 tty4::respawn:/usr/bin/getty 38400 tty4 -ttyS0::respawn:/usr/bin/getty 115200 ttyS0 \ No newline at end of file +ttyS0::respawn:/usr/bin/getty 115200 ttyS0 diff --git a/etc/network/interfaces b/etc/network/interfaces index d8c9c8a..f0a78b7 100644 --- a/etc/network/interfaces +++ b/etc/network/interfaces @@ -9,8 +9,8 @@ iface lo inet loopback #------------------------------------------- #--- eth0 connected to the internet static --- -# auto eth0 -# iface eth0 inet static -# address 192.168.200.1 -# netmask 255.255.255.0 +auto eth0 +iface eth0 inet static + address 192.168.200.1 + netmask 255.255.255.0 #--------------------------------------------- diff --git a/etc/passwd b/etc/passwd index 72f2cb6..db26337 100644 --- a/etc/passwd +++ b/etc/passwd @@ -1,4 +1,5 @@ root:x:0:0:root:/root:/bin/sh dnsmasq:x:963:963:dnsmasq daemon:/:/usr/bin/nologin sshd:x:33:33:SSH daemon:/var/lib/sshd:/bin/sh -nobody:x:65534:65534:Kernel Oerflow User:/:/usr/bin/nologin \ No newline at end of file +nobody:x:65534:65534:Kernel Oerflow User:/:/usr/bin/nologin +gitea:x:1000:1000:Gitea daemon user:/home/gitea:/bin/sh \ No newline at end of file diff --git a/etc/profile b/etc/profile index 9845f19..8b8f26f 100644 --- a/etc/profile +++ b/etc/profile @@ -22,4 +22,6 @@ alias ipl='ip link' # show links alias ll='ls -lh' # show list files with information alias la='ls -a' alias l='ls -alh' +alias df='df -h' +alias free='free -h' #----------- diff --git a/usr/bin/sensors b/usr/bin/sensors new file mode 100755 index 0000000..1c64415 --- /dev/null +++ b/usr/bin/sensors @@ -0,0 +1,11 @@ +#!/bin/sh + +if [ ! -d /sys/class/thermal ]; then + echo ERROR: no thermal interfaces + exit 1 +fi + +for interface in $(ls /sys/class/thermal/ | grep thermal_zone); do + echo $interface: $(($(cat /sys/class/thermal/$interface/temp)/1000))C +done + diff --git a/usr/lib/init/services/ftpd.service b/usr/lib/init/services/ftpd.service index 0ef87d9..cd4df7b 100755 --- a/usr/lib/init/services/ftpd.service +++ b/usr/lib/init/services/ftpd.service @@ -7,7 +7,7 @@ start() { notify "Starting ftpd" - tcpsvd -vE 0.0.0.0 21 ftpd -w -S -A /srv/ftpd &>/dev/null & + tcpsvd -vE 0.0.0.0 21 ftpd -w -S -A /srv/ftp &>/dev/null & check $? "start ftpd" echo $(pgrep tcpsvd) > /var/run/ftpd.pid return $? diff --git a/usr/lib/init/services/gitea.service b/usr/lib/init/services/gitea.service new file mode 100644 index 0000000..6eed33f --- /dev/null +++ b/usr/lib/init/services/gitea.service @@ -0,0 +1,33 @@ +#!/bin/sh + +#--- import colors and init-funcs --- +. /usr/lib/init/colors.sh +. /usr/lib/init/init-funcs.sh +#------------------------------------ + +start() { + notify "Starting gitea" + su gitea -c "/usr/bin/gitea -w /home/gitea" &> /var/log/gitea.log & + check $? "start gitea" + echo $(pgrep gitea) > /var/run/gitea.pid + return $? +} + +stop() { + notify "Stopping gitea" + kill $(cat /var/run/gitea.pid | awk '{print $2}') + check $? "stop gitea" + rm /var/run/gitea.pid &> /dev/null + return $? +} + +case "$1" in + start|stop|restart|reload|help) + "$1" + ;; + *) + help + return 1 + ;; +esac +return $? diff --git a/usr/lib/init/services/httpd.service b/usr/lib/init/services/httpd.service index 49e5386..e66b0d7 100755 --- a/usr/lib/init/services/httpd.service +++ b/usr/lib/init/services/httpd.service @@ -6,7 +6,7 @@ #------------------------------------ start() { - otify "Starting httpd" + notify "Starting httpd" /usr/bin/httpd -h /srv/www check $? "start httpd" echo $(pgrep httpd) > /var/run/httpd.pid diff --git a/usr/share/rc/orders b/usr/share/rc/orders index 5be61d9..120295e 100644 --- a/usr/share/rc/orders +++ b/usr/share/rc/orders @@ -14,4 +14,5 @@ 14httpd 15nginx 16openrouterinit -17dropbear \ No newline at end of file +17dropbear +18gitea \ No newline at end of file diff --git a/usr/share/udhcpc/default.script b/usr/share/udhcpc/default.script old mode 100644 new mode 100755