Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testbranch #133

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Java (Maven) application for tracking time on the job

Time tracker

Good Night Students!!!
Good evening Students!!!
Empty file added file7
Empty file.
58 changes: 58 additions & 0 deletions java/service.ssh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

# Define the Apache HTTP Server executable path. Change this if necessary.
httpd_path="/usr/sbin/httpd"

# Define the Apache configuration file path. Change this if necessary.
config_file="/etc/httpd/conf/httpd.conf"

# Function to start Apache server
start_server() {
if pgrep -f "$httpd_path -k start" > /dev/null; then
echo "Apache is already running."
else
$httpd_path -k start -f $config_file
echo "Apache started."
fi
}

# Function to stop Apache server
stop_server() {
if pgrep -f "$httpd_path -k start" > /dev/null; then
$httpd_path -k stop -f $config_file
echo "Apache stopped."
else
echo "Apache is not running."
fi
}

# Function to check the status of Apache server
status_server() {
if pgrep -f "$httpd_path -k start" > /dev/null; then
echo "Apache is running."
else
echo "Apache is not running."
fi
}

# Main script
case "$1" in
start)
start_server
;;
stop)
stop_server
;;
restart)
stop_server
start_server
;;
status)
status_server
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
esac

exit 0
Empty file added test3
Empty file.
Empty file added test8.txt
Empty file.