Linux counter client

Register new machine and get LiCo “Machine ID” and “Update key”.

1. Login to your profile.

userid 207256
password xyz

2. Add user cron to launch Linux counter update script.
useradd -m cron

3. Install script.

cd /usr/local/bin
wget -N --no-cache
chown root:root /usr/local/bin/
chmod 755 /usr/local/bin/

4. Install cron.d job.

00 21 * * 0 cron /usr/local/bin/ -m >> /var/log/lico-update 2>&1
30 21 1 * * root /usr/local/bin/ -update && chmod 755 /usr/local/bin/>> /var/log/lico-update 2>&1

chown root:root /etc/cron.d/linuxcounter
chmod 644 /etc/cron.d/linuxcounter
touch /var/log/lico-update
chown root:cron /var/log/lico-update
chmod 664 /var/log/lico-update
mkdir /root/.linuxcounter/
ln -s /home/cron/.linuxcounter/$(hostname) /root/.linuxcounter/

5. Register new machine, choose option [1] Create a new machine in your linuxcounter account.

su cron -
/usr/local/bin/ -i
cat /home/cron/.linuxcounter/$(hostname)
/usr/local/bin/ -m

Upgrade from version 0.3.20 to 0.0.4 😉

Proceed with steps 3. and 4. above.
Copy your ApiKey from your Profile.

su - cron

Keep your “update_key” and “machine_number” from already registered machine.
grep 'update_key\|machine_number' /home/cron/.linuxcounter/$(hostname)

/usr/local/bin/ -i

Choose option [3] Rescan the system and replace the current configuration with the scanned data.

Open your favorite editor:
vi /home/cron/.linuxcounter/$(hostname)

Use your “update_key” and “machine_number” you got above:


And paste values in new variables “machine_updatekey” and “machine_id”.


Send new data to server:
/usr/local/bin/ -m

As user #root try script update function:
/usr/local/bin/ -update && chmod 755 /usr/local/bin/

Print Friendly, PDF & Email