Lección 1,
Tema 1
En progreso
Ejercicios Copy
Ejercicio 1
En el directorio /home/user_name/, cree un archivo de script de shell, test.sh:
#!/bin/bash echo current date/time is $(/bin/date) >> /home/hostadm/timecheck.txt |
- Haz el script ejecutable
- En el directorio /lib/systemd/system, cree el archivo de servicio de la unidad, test.service
- Habilita el servicio test en systemd
- Ejecuta el siguiente comando
- systemctl start test
- systemctl status test
- Revisa si el archivo /home/user_name/timecheck.txt fue actualizado
- Reinicia la maquina virtual, y ejecuta el comando systemctl status test
Revisa si el archivo /home/user_name/timecheck.txt fue actualizado