Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

RaspberryPi: CumulusMX init.d System Startup Script

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

jpsc wrote:
jank wrote: 1. Adding a sleep into the init.d Script to give the system more time until mounting has finnished
sudo nano /etc/init.d/cumulusmx
On top, after the line --> ### END INIT INFO insert
sleep 20
to give the system 20 more seconds to come completely up.
That did it.
Thanks for all your help.
I'll move the sleep into the start branch.
Thank you very much for the update. I really appreciate it.
I will update the init.d script with a new version which will delay and repeat until a path is accessible.
Jan
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

I modified the init.d startup Script so that the script will wait until an external drive is being mounted.
There is a 30 second timeout which let the script wait ebfore it will quit starting CumulusMX.
This is being logged into /var/log/syslog
The updated file can be found in post #1
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:I modified the init.d startup Script so that the script will wait until an external drive is being mounted.
There is a 30 second timeout which let the script wait ebfore it will quit starting CumulusMX.
Bizarrely this does not work for a 4GB Jessie Lite SD I have just built (because I accidentally started on an 8GB card and expanded the filesystem). Putting the 8GB SD back in does work. Is far as I can see I produced both cards identically.

The delay should only really be on the start branch.
jank wrote:This is being logged into /var/log/syslog
How does this work? There is no trace of the echo in my syslog, I just see:

Code: Select all

Jun  6 23:29:43 WeatherServer cumulusmx[376]: Starting CumulusMX...
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

jpsc wrote:Bizarrely this does not work for a 4GB Jessie Lite SD I have just built (because I accidentally started on an 8GB card and expanded the filesystem). Putting the 8GB SD back in does work. Is far as I can see I produced both cards identically.
thats really weired ...but I am not sure if this is caused by the startup scirpt or not......
jpsc wrote:The delay should only really be on the start branch.
It is only when booted because
a) I am checking the existance of the /mnt/CumulusMX/Cumulus.ini file
if the file exist, I assume the mounted device is already present and no delay.
b) If the file is not present I am waiting for a maximum of 30 seconds for this file. If it is not accessible within 30 seconds, I quit.
jpsc wrote:
jank wrote:This is being logged into /var/log/syslog
How does this work? There is no trace of the echo in my syslog, I just see:

Code: Select all

Jun  6 23:29:43 WeatherServer cumulusmx[376]: Starting CumulusMX...
Are you sure, that you have installed the correct version ?
if you use grep -i version /etc/init.d/cumulusmx
you should get this ---> # Version: 1.1 - 06.06.2016
If you get nothing, it is the old version.

If you have the new version, you can force an output to the console with
sudo /etc/init.d/cumulusmx status
Result:
Jun 06 11:59:30 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Checking CumulusMX... Running


and exactly the first line should also be written into /var/log/syslog when you reboot your Pi

Jun 7 12:02:07 cumulus systemd[1]: Starting LSB: Start cumulusmx.sh (CumulusMX) at boot time...
Jun 7 12:02:07 cumulus cumulusmx[461]: Jun 06 12:02:06 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
(the second line is the new line) and in your case, you should see: .....started at system boot within 10 seconds
because at boot, the mounted drive is not ready within 0 seconds, but after a couple of more seconds.
Jan
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:Are you sure, that you have installed the correct version ?
if you use grep -i version /etc/init.d/cumulusmx
you should get this ---> # Version: 1.1 - 06.06.2016
If you get nothing, it is the old version.

If you have the new version, you can force an output to the console with
sudo /etc/init.d/cumulusmx status
Result:
Jun 06 11:59:30 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Checking CumulusMX... Running
I am certain

Code: Select all

<<<<<<<<< Cumulus Status at Tue 7 Jun 23:00:42 BST 2016 >>>>>>>>

Version check
CumulusMX   Version: Cumulus MX v.3.0.0 build 3038 - Available Version: v3.0.0 build 3038
This Script Version: 2.5.2.0 (2016-05-02) - Available Version: 2.5.2.0 (2016-05-02)
CumulusNow  Version: 1.3 - Available Version: 1.3 (29.07.2015)
Linux  OS   Version: "Raspbian GNU/Linux" - DEBIAN - 8 (JESSIE) - 4.4.11-v7+
Mono Version: Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-10)
Status check
CumulusMX is running
CumulusMX is running since: 2016-06-06 23:29
CumulusMX is  listening on TCP Port: 8998 (http://192.168.1.250:8998)
CumulusMX was started by user: root - CumulusMX-Statuspage was called as: root and locale is:
ProcessID (PID) of CumulusMX is: 906
Environment check
Path to CumulusMX is: /mnt/SSD/CumulusMX
Path to CumulusMX Backup Folder is:  - Backups to keep: 5
Path to CumulusMX DD Backup Folder is:  - Backups to keep: 2
Cloud Backup Settings are not configured
System Locale: en_GB.UTF-8 - CumulusMX Language: English English
System check
Current System Date/Time is: Tue  7 Jun 23:00:41 BST 2016
Network Interface: eth0 - IP Address: 192.168.1.250 - Netmask: 255.255.255.0
System Uptime of RasberryPi(WeatherServer) is: 23 hours 31 minutes
Overall used diskspace of /mnt/SSD/CumulusMX Folder is: 2.9G    /mnt/SSD/CumulusMX
Free diskspace on this device: 2.0G of 3.5G Total, used 1.4G
Free diskspace on boot device: 59%
Free diskspace on CumulusMX Install device (/mnt/SSD/CumulusMX): 97%

pi@WeatherServer:~ $ sudo grep -i version /etc/init.d/cumulusmx
# Version:           1.1 - 06.06.2016
pi@WeatherServer:~ $ sudo /etc/init.d/cumulusmx status
Jun 06 23:00:58 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Checking CumulusMX...                             Running
pi@WeatherServer:~ $
but why the Jun 06 date?
jank wrote:and exactly the first line should also be written into /var/log/syslog when you reboot your Pi
OK that's the 8GB card. I'll now boot the 4GB that fails
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

OK here it is, from the first occurrence of CumulusMX in the syslog (the time is wrong at the beginning because it hasn't connected to a time server yet):

Code: Select all

Jun  6 23:26:54 WeatherServer systemd[1]: Starting LSB: Start cumulusmx.sh (CumulusMX) at boot time...
Jun  6 23:26:54 WeatherServer kernel: [    3.142873] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
Jun  6 23:26:54 WeatherServer kernel: [    3.152767] usb 1-1: new high-speed USB device number 2 using dwc_otg
Jun  6 23:26:54 WeatherServer kernel: [    3.152979] Indeed it is in host mode hprt0 = 00001101
Jun  6 23:26:54 WeatherServer kernel: [    3.186921] devtmpfs: mounted
Jun  6 23:26:54 WeatherServer systemd[1]: Starting Avahi mDNS/DNS-SD Stack...
Jun  6 23:26:54 WeatherServer kernel: [    3.195341] Freeing unused kernel memory: 476K (807e7000 - 8085e000)
Jun  6 23:26:54 WeatherServer kernel: [    3.353180] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
Jun  6 23:26:54 WeatherServer kernel: [    3.364721] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jun  6 23:26:54 WeatherServer kernel: [    3.377598] hub 1-1:1.0: USB hub found
Jun  6 23:26:54 WeatherServer dhcpcd[369]: version 6.7.1 starting
Jun  6 23:26:54 WeatherServer kernel: [    3.386157] hub 1-1:1.0: 5 ports detected
Jun  6 23:26:54 WeatherServer kernel: [    3.546285] random: systemd urandom read with 50 bits of entropy available
Jun  6 23:26:54 WeatherServer kernel: [    3.672773] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
Jun  6 23:26:54 WeatherServer kernel: [    3.749196] NET: Registered protocol family 10
Jun  6 23:26:54 WeatherServer systemd[1]: Starting D-Bus System Message Bus...
Jun  6 23:26:54 WeatherServer kernel: [    3.783231] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
Jun  6 23:26:54 WeatherServer kernel: [    3.783243] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jun  6 23:26:54 WeatherServer kernel: [    3.786352] smsc95xx v1.0.4
Jun  6 23:26:54 WeatherServer cron[368]: (CRON) INFO (Running @reboot jobs)
Jun  6 23:26:54 WeatherServer kernel: [    3.857232] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-3f980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:2c:b6:98
Jun  6 23:26:54 WeatherServer kernel: [    3.916805] uart-pl011 3f201000.uart: no DMA platform data
Jun  6 23:26:54 WeatherServer kernel: [    3.952837] usb 1-1.3: new high-speed USB device number 4 using dwc_otg
Jun  6 23:26:54 WeatherServer kernel: [    4.063412] usb 1-1.3: New USB device found, idVendor=1a40, idProduct=0201
Jun  6 23:26:54 WeatherServer systemd[1]: Started D-Bus System Message Bus.
Jun  6 23:26:54 WeatherServer kernel: [    4.075693] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Jun  6 23:26:54 WeatherServer kernel: [    4.088357] usb 1-1.3: Product: USB 2.0 Hub [MTT]
Jun  6 23:26:54 WeatherServer kernel: [    4.099491] hub 1-1.3:1.0: USB hub found
Jun  6 23:26:54 WeatherServer dphys-swapfile[372]: Starting dphys-swapfile swapfile setup ...
Jun  6 23:26:54 WeatherServer kernel: [    4.108872] hub 1-1.3:1.0: 6 ports detected
Jun  6 23:26:54 WeatherServer kernel: [    4.392781] usb 1-1.3.2: new high-speed USB device number 5 using dwc_otg
Jun  6 23:26:54 WeatherServer kernel: [    4.504772] usb 1-1.3.2: New USB device found, idVendor=05e3, idProduct=0718
Jun  6 23:26:54 WeatherServer dhcpcd[369]: dev: loaded udev
Jun  6 23:26:54 WeatherServer kernel: [    4.504784] usb 1-1.3.2: New USB device strings: Mfr=0, Product=1, SerialNumber=2
Jun  6 23:26:54 WeatherServer kernel: [    4.504794] usb 1-1.3.2: Product: USB Storage
Jun  6 23:26:54 WeatherServer kernel: [    4.504803] usb 1-1.3.2: SerialNumber: 000000000033
Jun  6 23:26:54 WeatherServer kernel: [    4.506081] usb-storage 1-1.3.2:1.0: USB Mass Storage device detected
Jun  6 23:26:54 WeatherServer triggerhappy[373]: Error opening '/dev/input/event*': No such file or directory
Jun  6 23:26:54 WeatherServer kernel: [    4.589492] scsi host0: usb-storage 1-1.3.2:1.0
Jun  6 23:26:54 WeatherServer cumulusmx[375]: Jun 06 23:26:53 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Jun  6 23:26:54 WeatherServer dhcpcd[369]: eth0: adding address fe80::8bf9:556f:3e96:c46b
Jun  6 23:26:54 WeatherServer dphys-swapfile[372]: want /var/swap=100MByte, checking existing: keeping it
Jun  6 23:26:54 WeatherServer avahi-daemon[377]: Found user 'avahi' (UID 105) and group 'avahi' (GID 110).
Jun  6 23:26:54 WeatherServer avahi-daemon[377]: Successfully dropped root privileges.
Jun  6 23:26:54 WeatherServer avahi-daemon[377]: avahi-daemon 0.6.31 starting up.
Jun  6 23:26:54 WeatherServer dphys-swapfile[372]: done.
Jun  6 23:26:54 WeatherServer ModemManager[366]: <info>  ModemManager (version 1.4.0) starting in system bus...
Jun  6 23:26:54 WeatherServer avahi-daemon[377]: Successfully called chroot().
Jun  6 23:26:54 WeatherServer avahi-daemon[377]: Successfully dropped remaining capabilities.
Jun  6 23:26:54 WeatherServer dbus[379]: [system] Successfully activated service 'org.freedesktop.systemd1'
Jun  6 23:26:54 WeatherServer systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Jun  6 23:26:54 WeatherServer systemd[1]: Starting System Logging Service...
Jun  6 23:26:54 WeatherServer systemd[1]: Starting Permit User Sessions...
Jun  6 23:26:54 WeatherServer systemd[1]: Started Restore Sound Card State.
Jun  6 23:26:54 WeatherServer kernel: [    4.710116] usb 1-1.3.5: new low-speed USB device number 6 using dwc_otg
Jun  6 23:26:54 WeatherServer kernel: [    4.888446] usb 1-1.3.5: New USB device found, idVendor=1941, idProduct=8021
Jun  6 23:26:54 WeatherServer systemd[1]: Started LSB: Autogenerate and use a swap file.
Jun  6 23:26:54 WeatherServer kernel: [    4.888458] usb 1-1.3.5: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Jun  6 23:26:54 WeatherServer kernel: [    4.935054] hid-generic 0003:1941:8021.0001: hiddev0,hidraw0: USB HID v1.00 Device [HID 1941:8021] on usb-3f980000.usb-1.3.5/input0
Jun  6 23:26:54 WeatherServer systemd[1]: Started LSB: triggerhappy hotkey daemon.
Jun  6 23:26:54 WeatherServer kernel: [    5.615249] scsi 0:0:0:0: Direct-Access     SanDisk  SDSSDA120G       0009 PQ: 0 ANSI: 0
Jun  6 23:26:54 WeatherServer kernel: [    5.630640] sd 0:0:0:0: [sda] 234441644 512-byte logical blocks: (120 GB/112 GiB)
Jun  6 23:26:54 WeatherServer kernel: [    5.644371] sd 0:0:0:0: [sda] Write Protect is off
Jun  6 23:26:54 WeatherServer kernel: [    5.654665] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
Jun  6 23:26:54 WeatherServer kernel: [    5.655287] sd 0:0:0:0: [sda] No Caching mode page found
Jun  6 23:26:54 WeatherServer kernel: [    5.666043] sd 0:0:0:0: [sda] Assuming drive cache: write through
Jun  6 23:26:54 WeatherServer kernel: [    5.681214]  sda: sda1
Jun  6 23:26:54 WeatherServer systemd[1]: Got automount request for /proc/sys/fs/binfmt_misc, triggered by 370 (update-binfmts)
Jun  6 23:26:54 WeatherServer kernel: [    5.691977] sd 0:0:0:0: [sda] Attached SCSI disk
Jun  6 23:26:54 WeatherServer kernel: [    6.701391] sd 0:0:0:0: Attached scsi generic sg0 type 0
Jun  6 23:26:54 WeatherServer kernel: [    6.992931] bcm2835-wdt 3f100000.watchdog: Broadcom BCM2835 watchdog timer
Jun  6 23:26:54 WeatherServer kernel: [    6.996107] gpiomem-bcm2835 3f200000.gpiomem: Initialised: Registers at 0x3f200000
Jun  6 23:26:54 WeatherServer kernel: [    7.273293] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Jun  6 23:26:54 WeatherServer kernel: [    7.462381] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
Jun  6 23:26:54 WeatherServer systemd[1]: Mounting Arbitrary Executable File Formats File System...
Jun  6 23:26:54 WeatherServer kernel: [    9.104252] random: nonblocking pool is initialized
Jun  6 23:26:54 WeatherServer kernel: [    9.281602] Adding 102396k swap on /var/swap.  Priority:-1 extents:3 across:200700k SSFS
Jun  6 23:26:54 WeatherServer kernel: [    9.537527] cfg80211: World regulatory domain updated:
Jun  6 23:26:54 WeatherServer kernel: [    9.537552] cfg80211:  DFS Master region: unset
Jun  6 23:26:54 WeatherServer kernel: [    9.537561] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
Jun  6 23:26:54 WeatherServer kernel: [    9.537575] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Jun  6 23:26:54 WeatherServer kernel: [    9.537588] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
Jun  6 23:26:54 WeatherServer systemd[1]: Started Login Service.
Jun  6 23:26:54 WeatherServer kernel: [    9.537598] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
Jun  6 23:26:54 WeatherServer kernel: [    9.537611] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (N/A)
Jun  6 23:26:54 WeatherServer avahi-daemon[377]: No service file found in /etc/avahi/services.
Jun  6 23:26:54 WeatherServer kernel: [    9.537623] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
Jun  6 23:26:54 WeatherServer kernel: [    9.537634] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
Jun  6 23:26:54 WeatherServer kernel: [    9.537644] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
Jun  6 23:26:54 WeatherServer kernel: [    9.537654] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
Jun  6 23:26:54 WeatherServer avahi-daemon[377]: Network interface enumeration completed.
Jun  6 23:26:54 WeatherServer avahi-daemon[377]: Registering HINFO record with values 'ARMV7L'/'LINUX'.
Jun  6 23:26:54 WeatherServer avahi-daemon[377]: Server startup complete. Host name is WeatherServer.local. Local service cookie is 842085762.
Jun  6 23:26:54 WeatherServer systemd[1]: Started Permit User Sessions.
Jun  6 23:26:54 WeatherServer systemd[1]: Mounted Arbitrary Executable File Formats File System.
Jun  6 23:26:54 WeatherServer systemd[1]: Started Enable support for additional executable binary formats.
Jun  6 23:26:54 WeatherServer systemd[1]: Started System Logging Service.
Jun  6 23:26:54 WeatherServer rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
Jun  6 23:26:54 WeatherServer rsyslogd-2307: warning: ~ action is deprecated, consider using the 'stop' statement instead [try http://www.rsyslog.com/e/2307 ]
Jun  6 23:26:55 WeatherServer avahi-daemon[377]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::8bf9:556f:3e96:c46b.
Jun  6 23:26:55 WeatherServer dhcpcd[369]: eth0: waiting for carrier
Jun  6 23:26:55 WeatherServer avahi-daemon[377]: New relevant interface eth0.IPv6 for mDNS.
Jun  6 23:26:55 WeatherServer avahi-daemon[377]: Registering new address record for fe80::8bf9:556f:3e96:c46b on eth0.*.
Jun  6 23:26:55 WeatherServer kernel: [   10.515274] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
Jun  6 23:26:55 WeatherServer kernel: [   10.515791] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun  6 23:26:55 WeatherServer systemd[1]: Started Modem Manager.
Jun  6 23:26:56 WeatherServer kernel: [   12.030738] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jun  6 23:26:56 WeatherServer dhcpcd[369]: eth0: carrier acquired
Jun  6 23:26:56 WeatherServer kernel: [   12.035235] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
Jun  6 23:26:56 WeatherServer dhcpcd[369]: DUID 00:01:00:01:1e:da:ef:28:b8:27:eb:2c:b6:98
Jun  6 23:26:56 WeatherServer dhcpcd[369]: eth0: IAID eb:2c:b6:98
Jun  6 23:26:56 WeatherServer dhcpcd[369]: eth0: soliciting an IPv6 router
Jun  6 23:26:57 WeatherServer dhcpcd[369]: eth0: using static address 192.168.1.250/24
Jun  6 23:26:57 WeatherServer avahi-daemon[377]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.250.
Jun  6 23:26:57 WeatherServer avahi-daemon[377]: New relevant interface eth0.IPv4 for mDNS.
Jun  6 23:26:57 WeatherServer dhcpcd[369]: eth0: adding route to 192.168.1.0/24
Jun  6 23:26:57 WeatherServer avahi-daemon[377]: Registering new address record for 192.168.1.250 on eth0.IPv4.
Jun  6 23:26:57 WeatherServer dhcpcd[369]: eth0: adding default route via 192.168.1.254
Jun  6 23:26:57 WeatherServer ModemManager[366]: <warn>  Couldn't find support for device at '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1': not supported by any plugin
Jun  6 23:26:58 WeatherServer dhcpcd[369]: forked to background, child pid 602
Jun  6 23:26:58 WeatherServer dhcpcd[602]: eth0: Router Advertisement from fe80::237:b7ff:fec2:7f04
Jun  6 23:26:59 WeatherServer systemd[1]: Started dhcpcd on all interfaces.
Jun  6 23:26:59 WeatherServer systemd[1]: Starting Network.
Jun  6 23:26:59 WeatherServer systemd[1]: Reached target Network.
Jun  6 23:26:59 WeatherServer systemd[1]: Starting OpenBSD Secure Shell server...
Jun  6 23:26:59 WeatherServer systemd[1]: Started OpenBSD Secure Shell server.
Jun  6 23:26:59 WeatherServer systemd[1]: Starting /etc/rc.local Compatibility...
Jun  6 23:26:59 WeatherServer systemd[1]: Starting Network is Online.
Jun  6 23:26:59 WeatherServer systemd[1]: Reached target Network is Online.
Jun  6 23:26:59 WeatherServer systemd[1]: Starting LSB: Monitor and Control Everything IT from Any Smartphone or Tablet...
Jun  6 23:26:59 WeatherServer systemd[1]: Starting LSB: Start NTP daemon...
Jun  6 23:26:59 WeatherServer systemd[1]: Starting LSB: start Samba daemons for the AD DC...
Jun  6 23:26:59 WeatherServer systemd[1]: Starting LSB: Apache2 web server...
Jun  6 23:26:59 WeatherServer systemd[1]: Starting LSB: start Samba NetBIOS nameserver (nmbd)...
Jun  6 23:26:59 WeatherServer systemd[1]: Started /etc/rc.local Compatibility.
Jun  6 23:26:59 WeatherServer dhcpcd[602]: eth0: requesting DHCPv6 information
Jun  6 23:26:59 WeatherServer systemd[1]: Starting Terminate Plymouth Boot Screen...
Jun  6 23:26:59 WeatherServer systemd[1]: Starting Wait for Plymouth Boot Screen to Quit...
Jun  6 23:26:59 WeatherServer systemd[1]: Started Wait for Plymouth Boot Screen to Quit.
Jun  6 23:26:59 WeatherServer systemd[1]: Started Terminate Plymouth Boot Screen.
Jun  6 23:26:59 WeatherServer systemd[1]: Starting Getty on tty1...
Jun  6 23:26:59 WeatherServer systemd[1]: Started Getty on tty1.
Jun  6 23:26:59 WeatherServer systemd[1]: Starting Serial Getty on ttyAMA0...
Jun  6 23:26:59 WeatherServer systemd[1]: Started Serial Getty on ttyAMA0.
Jun  6 23:26:59 WeatherServer systemd[1]: Starting Login Prompts.
Jun  6 23:26:59 WeatherServer systemd[1]: Reached target Login Prompts.
Jun  6 23:26:59 WeatherServer ntpd[674]: ntpd 4.2.6p5@1.2349-o Mon Nov  2 04:29:47 UTC 2015 (1)
Jun  6 23:26:59 WeatherServer ntpd[685]: proto: precision = 0.782 usec
Jun  6 23:26:59 WeatherServer ntpd[685]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Jun  6 23:26:59 WeatherServer ntp[636]: Starting NTP server: ntpd.
Jun  6 23:26:59 WeatherServer systemd[1]: Started LSB: Start NTP daemon.
Jun  6 23:26:59 WeatherServer ntpd[685]: Listen and drop on 1 v6wildcard :: UDP 123
Jun  6 23:26:59 WeatherServer ntpd[685]: Listen normally on 2 lo 127.0.0.1 UDP 123
Jun  6 23:26:59 WeatherServer ntpd[685]: Listen normally on 3 eth0 192.168.1.250 UDP 123
Jun  6 23:26:59 WeatherServer ntpd[685]: Listen normally on 4 lo ::1 UDP 123
Jun  6 23:26:59 WeatherServer ntpd[685]: Listen normally on 5 eth0 fe80::8bf9:556f:3e96:c46b UDP 123
Jun  6 23:26:59 WeatherServer ntpd[685]: peers refreshed
Jun  6 23:26:59 WeatherServer ntpd[685]: Listening on routing socket on fd #22 for interface updates
Jun  6 23:26:59 WeatherServer pulseway: Starting Pulseway Daemon version 4.8.3 (2015111801)
Jun  6 23:26:59 WeatherServer systemd[1]: Started LSB: Monitor and Control Everything IT from Any Smartphone or Tablet.
Jun  6 23:26:59 WeatherServer pulseway: Configuration read successfully!
Jun  7 23:21:09 WeatherServer systemd[1]: Time has been changed
Jun  7 23:21:12 WeatherServer apache2[651]: Starting web server: apache2AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
Jun  7 23:21:13 WeatherServer apache2[651]: .
Jun  7 23:21:13 WeatherServer systemd[1]: Started LSB: Apache2 web server.
Jun  7 23:21:15 WeatherServer systemd[1]: Started LSB: start Samba daemons for the AD DC.
Jun  7 23:21:16 WeatherServer nmbd[657]: Starting NetBIOS name server: nmbd.
Jun  7 23:21:16 WeatherServer systemd[1]: Started LSB: start Samba NetBIOS nameserver (nmbd).
Jun  7 23:21:16 WeatherServer systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)...
Jun  7 23:21:17 WeatherServer smbd[782]: Starting SMB/CIFS daemon: smbd.
Jun  7 23:21:17 WeatherServer systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).
Jun  7 23:21:30 WeatherServer cumulusmx[375]: Starting CumulusMX...
Jun  7 23:21:30 WeatherServer systemd[1]: Started LSB: Start cumulusmx.sh (CumulusMX) at boot time.
Jun  7 23:21:30 WeatherServer systemd[1]: Starting Multi-User System.
Jun  7 23:21:30 WeatherServer systemd[1]: Reached target Multi-User System.
Jun  7 23:21:30 WeatherServer systemd[1]: Starting Graphical Interface.
Jun  7 23:21:30 WeatherServer systemd[1]: Reached target Graphical Interface.
Jun  7 23:21:30 WeatherServer systemd[1]: Starting Update UTMP about System Runlevel Changes...
Jun  7 23:21:30 WeatherServer systemd[1]: Started Update UTMP about System Runlevel Changes.
Jun  7 23:21:30 WeatherServer systemd[1]: Startup finished in 3.285s (kernel) + 41.874s (userspace) = 45.159s.
Jun  7 23:21:42 WeatherServer dhcpcd[602]: eth0: Router Advertisement from fe80::237:b7ff:fec2:7f04
pi@WeatherServer:~ $ sudo /etc/init.d/cumulusmx status
Jun 06 23:27:45 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds
Checking CumulusMX...                             Service not running
pi@WeatherServer:~ $ sudo grep -i version /etc/init.d/cumulusmx
# Version:           1.1 - 06.06.2016
pi@WeatherServer:~ $
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

Ah yes

Code: Select all

   echo "$(date +"%Y-%m-%d %H:%M:%S") CumulusMX init.d-Script: CumulusMX is being started at system boot within "$x" seconds"
would be better
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

jpsc wrote:Ah yes

Code: Select all

   echo "$(date +"%Y-%m-%d %H:%M:%S") CumulusMX init.d-Script: CumulusMX is being started at system boot within "$x" seconds"
would be better
hi John, I choosed this output <"$(date +"%b %m %H:%M:%S")> to be similar to the date format in the syslog logfile

Jun 7 23:21:30 WeatherServer systemd[1]: Startup finished in 3.285s (kernel) + 41.874s (userspace) = 45.159s.
Jun 7 23:21:42 WeatherServer dhcpcd[602]: eth0: Router Advertisement
Jun 06 23:27:45 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds

You also asked: but why the Jun 06 date?

pi@WeatherServer:~ $ sudo grep -i version /etc/init.d/cumulusmx
# Version: 1.1 - 06.06.2016
This is only within the scriopt, verison number and when modified the scirpt....this is not in the oputput

Anyway, finally the new init.d Script is working on your 8GB SD Card with Jessie but not on your 4 GB Card with Jessie, correct?

This is strange....and I have no Idea, but you can do such a test:
As I already mentioned the new version is checking if the file /mnt/SSD/CumulusMX/Cumulux.ini exists. If not it will loop for max 30 seconds until the file is accessible.
When you call the script with sudo /etc/init.d/cumulusmx status you will get immidiately the result.
So how can we emulate a situation which is similar to the boot time, when the external drive is not accessible when the script is being called.
sudo nano /etc/init.d/cumulusmx
Go to the section where your path to CumulusMX is ....
### END INIT INFO
CumulusMX_HOME=/mnt/SSD/CumulusMX
CumulusMX_USER=root

and change the path to /mnt/SSD/CumulusM (so the path does not exist - rmeove the X at the end)
Now call the script again.....and it should delay for 30 seconds before it prints the status, correct?

I double checked this on my differet Pi's.
I changed the line
while [ "$x" -lt 300 -a ! -e $CumulusMX_HOME/Cumulus.ini ]; do
to while [ "$x" -lt 300 -a ! -e /tmp/test ]; do

I opened a second SSH session and in the first session I called: sudo /etc/init.d/cumulusmx status and my script delayed
in the other SSH session I typed: touch /tmp/test to create the test file
And in this moment, my Scirpt found the /tmp/test file and proceeds with the status command immidiately.
Jan
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:
jpsc wrote:Ah yes

Code: Select all

   echo "$(date +"%Y-%m-%d %H:%M:%S") CumulusMX init.d-Script: CumulusMX is being started at system boot within "$x" seconds"
would be better
hi John, I choosed this output <"$(date +"%b %m %H:%M:%S")> to be similar to the date format in the syslog logfile

Jun 7 23:21:30 WeatherServer systemd[1]: Startup finished in 3.285s (kernel) + 41.874s (userspace) = 45.159s.
Jun 7 23:21:42 WeatherServer dhcpcd[602]: eth0: Router Advertisement
Jun 06 23:27:45 CumulusMX init.d-Script: CumulusMX is being started at system boot within 0 seconds

You also asked: but why the Jun 06 date?
I meant %b %d would be better
jank wrote: pi@WeatherServer:~ $ sudo grep -i version /etc/init.d/cumulusmx
# Version: 1.1 - 06.06.2016
This is only within the scriopt, verison number and when modified the scirpt....this is not in the oputput

Anyway, finally the new init.d Script is working on your 8GB SD Card with Jessie but not on your 4 GB Card with Jessie, correct?
Yes
jank wrote:This is strange....and I have no Idea, but you can do such a test:
As I already mentioned the new version is checking if the file /mnt/SSD/CumulusMX/Cumulux.ini exists. If not it will loop for max 30 seconds until the file is accessible.
When you call the script with sudo /etc/init.d/cumulusmx status you will get immidiately the result.
So how can we emulate a situation which is similar to the boot time, when the external drive is not accessible when the script is being called.
sudo nano /etc/init.d/cumulusmx
Go to the section where your path to CumulusMX is ....
### END INIT INFO
CumulusMX_HOME=/mnt/SSD/CumulusMX
CumulusMX_USER=root

and change the path to /mnt/SSD/CumulusM (so the path does not exist - rmeove the X at the end)
Now call the script again.....and it should delay for 30 seconds before it prints the status, correct?

Code: Select all

pi@WeatherServer:~ $ sudo nano /etc/init.d/cumulusmx
pi@WeatherServer:~ $ sudo /etc/init.d/cumulusmx start
Jun 06 09:34:53 CumulusMX init.d-Script: CumulusMX could not be started - unable to mount /mnt/SSD/CumulusM within 30 seconds
pi@WeatherServer:~ $
So that is working, just not at boot time. On the 4GB card it says 0 seconds, but CumulusMX is not started.
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

John, you are right, my date format will always print Jun and the month again :-) So it is always Jun 06

Need to change it ......

John, I updated the version to 1.2 in the first post (fixed the date error - many thanks for reporting this error)
Regarding your 4 GB Card, I have no Idea......why it is working later when finnished booting , but not at boot time.....
So as long no one else is reporting such an issue I would suggest to add a sleep command for your 4 GB Pi :geek:
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:John, I updated the version to 1.2 in the first post (fixed the date error - many thanks for reporting this error)
Regarding your 4 GB Card, I have no Idea......why it is working later when finnished booting , but not at boot time.....
So as long no one else is reporting such an issue I would suggest to add a sleep command for your 4 GB Pi :geek:
The thing is, even with a sleep of 120s it does not start. I wonder if it is some other difference between the two environments.
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

jpsc wrote:
jank wrote:John, I updated the version to 1.2 in the first post (fixed the date error - many thanks for reporting this error)
Regarding your 4 GB Card, I have no Idea......why it is working later when finnished booting , but not at boot time.....
So as long no one else is reporting such an issue I would suggest to add a sleep command for your 4 GB Pi :geek:
The thing is, even with a sleep of 120s it does not start. I wonder if it is some other difference between the two environments.
Mhhmm weired....
can you add this line into the init.d script ?

### END INIT INFO
echo $(date +"%b %d %H:%M:%S") >> /tmp/BOOT

Reboot now
and once rebooted, please check if this file exists
cat /tmp/BOOT
...just to see, if the script is being started at boot
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

jank wrote:can you add this line into the init.d script ?

### END INIT INFO
echo $(date +"%b %d %H:%M:%S") >> /tmp/BOOT

Reboot now
and once rebooted, please check if this file exists
cat /tmp/BOOT
...just to see, if the script is being started at boot
and it is

Code: Select all

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Jun  8 15:12:10 2016 from bomb20
pi@WeatherServer:~ $ cat /tmp/BOOT
Jun 08 15:17:04
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
jank
Posts: 239
Joined: Sat 13 Jun 2015 5:57 pm
Weather Station: FineOffset WS3080
Operating System: Debian Buster - Raspbian - Raspb
Location: Germany - nearby Kassel

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jank »

Hella John

Now Move this line
echo $(date +"%b %d %H:%M:%S") >> /tmp/BOOT
One line under the end of the Loop i added to the init script.
....and reboot and Check if a Second line is being added to the /tmp/BOOT file.
And then go Down line by line or alternatively please wait until tomorrow and I will add a more verbose Output to this script.
Do want a Managing Dashboard for CumulusMX on RaspberryPi? cumulusmx.sh
viewtopic.php?f=40&t=17907
Image
User avatar
jpsc
Posts: 179
Joined: Tue 23 Aug 2011 6:06 pm
Weather Station: Davis Vantage Vue, belfryboy USB
Operating System: Raspbian Bullseye
Location: Wye valley, Herefordshire, UK
Contact:

Re: RaspberryPi: CumulusMX init.d System Startup Script

Post by jpsc »

I can wait, it's working at the moment...
John Cooper

Cumulus 3 on RPi3 with SSD

http://weather.mountpleasanthouse.uk

Image
Post Reply